12 2017 档案

摘要:#用户登陆访问限制 from django.http import HttpResponseRedirect #只有登录了才能看到页面 #设置方法一:指定特定管理员才能访问 def main(request): try: if not request.user.is_authenticated(): return HttpResponseRedi... 阅读全文
posted @ 2017-12-24 22:45 Xiao|Deng 阅读(1562) 评论(0) 推荐(0) 编辑
摘要:所以更改setttings.py 下 LANGUAGE_CODE = 'zh-Hans'即可 阅读全文
posted @ 2017-12-23 22:45 Xiao|Deng 阅读(1414) 评论(0) 推荐(0) 编辑
摘要:try: from StringIO import StringIO except ImportError: from io import StringIO 阅读全文
posted @ 2017-12-21 10:06 Xiao|Deng 阅读(490) 评论(0) 推荐(0) 编辑