regluit/admin.py

24 lines
443 B
Python
Raw Normal View History

2013-06-03 16:31:39 +00:00
"""
2013-07-08 15:14:25 +00:00
django imports
"""
2013-03-26 14:56:49 +00:00
from django import forms
2016-07-26 14:34:45 +00:00
from django.contrib.admin import ModelAdmin, site
from django.contrib.admin.sites import AdminSite
2013-06-03 16:31:39 +00:00
from django.contrib.auth.models import User
2013-03-26 14:56:49 +00:00
2013-06-03 16:31:39 +00:00
"""
regluit imports
"""
2016-07-26 14:34:45 +00:00
site.login_template = 'registration/login.html'
2011-11-19 17:07:44 +00:00
class UserAdmin(ModelAdmin):
2013-05-06 19:41:45 +00:00
search_fields = ['username', 'email']
list_display = ('username', 'email')
2011-11-19 17:07:44 +00:00
2013-03-26 14:56:49 +00:00
2016-05-16 20:50:09 +00:00
2016-07-26 14:34:45 +00:00
site.unregister(User)
site.register(User, UserAdmin)
2016-05-16 20:50:09 +00:00