九州编程
settings.pyMIDDLEWARE_CLASSES = ('django.middleware.common.CommonMiddleware','django.contrib.sessions.middleware.SessionMiddleware','django.middleware.csrf.CsrfViewMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware','django.contrib.messages.middleware.MessageMiddleware',)INSTALLED_APPS = ('django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.sites','django.contrib.messages','django.contrib.admin','django.contrib.staticfiles',)urls.pyfrom django.conf.urls.defaults import *from django.contrib import adminfrom django.conf import settingsadmin.autodiscover()urlpatterns = patterns('',url(r'^admin/', include(admin.site.urls)),)if settings.DEBUG:urlpatterns = patterns('',url(r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),url(r'', include('django.contrib.staticfiles.urls')),) + urlpatterns