Back

django 安装auth 模块 (install django auth)

发布时间: 2014-02-14 06:28:00

follow this post: https://docs.djangoproject.com/en/1.5/topics/auth/#installation 

1. add these lines to file:

# in settings.py file:
122 INSTALLED_APPS = (
123     'django.contrib.auth',
124     'django.contrib.contenttypes',
         .....

 98 MIDDLEWARE_CLASSES = (
 99     'django.middleware.common.CommonMiddleware',
102     'django.contrib.auth.middleware.AuthenticationMiddleware',
       ....

2. create database: $ python manage.py syncdb

Back