<commit_before>from django.contrib import admin
from django import forms
from django.contrib.auth.models import User

from insight.models import Origin, OriginGroup, QuerystringParameter


class OriginAdmin(admin.ModelAdmin):
    list_display = ('title', 'description', 'origin_group', 'url', 'number_of_registrations')

    def url(self, origin):
        url = origin.get_absolute_url()
        return '<a href="%s">%s</a>' % (url, url)
    url.allow_tags = True


class QuerystringParameterAdmin(admin.ModelAdmin):
    list_display = ('origin', 'identifier', 'value', 'number_of_registrations')
    
    def has_add_permission(self, *args, **kwargs):
        return False

    def has_delete_permission(self, *args, **kwargs):
        return False


admin.site.register(Origin, OriginAdmin)
admin.site.register(QuerystringParameter, QuerystringParameterAdmin)
admin.site.register(OriginGroup)<commit_msg>allow anything to be deleted in admin<commit_after>from django.contrib import admin
from django import forms
from django.contrib.auth.models import User

from insight.models import Origin, OriginGroup, QuerystringParameter


class OriginAdmin(admin.ModelAdmin):
    list_display = ('title', 'description', 'origin_group', 'url', 'number_of_registrations')

    def url(self, origin):
        url = origin.get_absolute_url()
        return '<a href="%s">%s</a>' % (url, url)
    url.allow_tags = True


class QuerystringParameterAdmin(admin.ModelAdmin):
    list_display = ('origin', 'identifier', 'value', 'number_of_registrations')


admin.site.register(Origin, OriginAdmin)
admin.site.register(QuerystringParameter, QuerystringParameterAdmin)
admin.site.register(OriginGroup)
{'fraction_non_alphanumeric': 0.11527035056446822, 'fraction_numerical': 0.0, 'mean_word_length': 5.260223048327138, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6226042', 'n_tokens_mistral': 500, 'n_tokens_neox': 473, 'n_words': 117}