2011年5月3日 星期二

add admin interface on django

1.uncomment the admin line on settings.py
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)

2.uncomment the lines on urls.py
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
# Uncomment the next line to enable the admin:
url( r'^admin/', include( admin.site.urls ) ),

3.use syncdb to create tables on bookmarks
#python manage syncdb

沒有留言:

張貼留言