<commit_before>from signbank.registration.models import *
from django.contrib import admin
from django.core.urlresolvers import reverse

class UserProfileAdmin(admin.ModelAdmin):
    list_display = ['user', 'permissions', 'best_describes_you', 'australian', 'auslan_user', 'deaf', 'researcher_credentials']
    readonly_fields = ['user', 'australian', 'auslan_user', 'deaf', 'yob', 'postcode', 'best_describes_you', 'researcher_credentials', 'learned', 'schooltype', 'school', 'teachercomm']
    list_filter = ['australian', 'auslan_user', 'deaf']
   
    def permissions(self, obj):
        url = reverse('admin:auth_user_change', args=(obj.pk,))
        return '<a href="%s">View user</a>' % (url)
    permissions.allow_tags = True
   
admin.site.register(UserProfile, UserProfileAdmin)<commit_msg>Use the correct user ID to show the user from the profiles view. Fixes %61.<commit_after>from signbank.registration.models import *
from django.contrib import admin
from django.core.urlresolvers import reverse

class UserProfileAdmin(admin.ModelAdmin):
    list_display = ['user', 'permissions', 'best_describes_you', 'australian', 'auslan_user', 'deaf', 'researcher_credentials']
    readonly_fields = ['user', 'australian', 'auslan_user', 'deaf', 'yob', 'postcode', 'best_describes_you', 'researcher_credentials', 'learned', 'schooltype', 'school', 'teachercomm']
    list_filter = ['australian', 'auslan_user', 'deaf']
   
    def permissions(self, obj):
        url = reverse('admin:auth_user_change', args=(obj.user.id,))
        return '<a href="%s">View user</a>' % (url)
    permissions.allow_tags = True
   
admin.site.register(UserProfile, UserProfileAdmin)
{'fraction_non_alphanumeric': 0.14877024595080984, 'fraction_numerical': 0.0011997600479904018, 'mean_word_length': 5.725806451612903, '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': '946683', 'n_tokens_mistral': 533, 'n_tokens_neox': 536, 'n_words': 119}