admin - user related modules in admin

12 views
Skip to first unread message

galgal

unread,
Jan 16, 2012, 7:45:59 PM1/16/12
to django...@googlegroups.com
I use extended user profile (class name: UserProfile). I made an app for this, named account. In settings I have set:AUTH_PROFILE_MODULE = 'account.UserProfile'

But I made another model in that app named RestrictedUsername. I want to put there usernames, that will be reserved and not available in register process. I don't know why, but it doesn't appear in admin panel. I registered it:
from django.contrib import admin
from apps.account.models import RestrictedUsername
class RestrictedUsernameAdmin(admin.ModelAdmin):
list_display = ('username',)
search_fields = ('username',)
admin.site.register(RestrictedUsername, RestrictedUsernameAdmin)

Any ideas how to make it work?
Reply all
Reply to author
Forward
0 new messages