此内容进行用户管理,首先在settings.py中启用django.contrib的app。
- INSTALLED_APPS = (
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.sites',
- 'django.contrib.messages',
- 'catsite.spinfo',
- )
-
(r'^admin/', include(admin.site.urls)),
admin.autodiscover()
- from django.contrib import admin
- from catsite.spinfo.models import xxx
- admin.site.register(xxx)