使用wagtail搭建cms的安装流程

wagtail基于django开发的cms系统
最终效果图:
使用wagtail搭建cms的安装流程_第1张图片

pip install wagtail
wagtail start mysite
cd mysite
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:9999

遇到的问题

linux-sdw9:/ctu/workshop/mysite # python manage.py runserver 0.0.0.0:9999
Performing system checks...

System check identified no issues (0 silenced).
February 13, 2017 - 10:43:39
Django version 1.9.7, using settings 'mysite.settings.dev'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
Internal Server Error: /admin/
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 43, in _cache_controlled
    response = viewfunc(request, *args, **kw)
  File "/usr/lib/python2.7/site-packages/wagtail/wagtailadmin/decorators.py", line 18, in decorated_view
    user = request.user
AttributeError: 'WSGIRequest' object has no attribute 'user'
[13/Feb/2017 10:43:42] "GET /admin/ HTTP/1.1" 500 71885

解决办法:
将mysite/settings/base.py的MIDDLEWARE改成MIDDLEWARE_CLASSES
参考资料:
http://blog.csdn.net/xiongjiezk/article/details/53220302

你可能感兴趣的:(程序人生)