django
文章平均质量分 54
柚子纯钧
这个作者很懒,什么都没留下…
展开
-
django项目配置使用django-admin-tools
原说明文档路径1.django-admin-tools安装(windows系统)pip install django-admin-tools 2.添加django.core.context_processors.request 到TEMPLATE_CONTEXT_PROCESSORS 或者TEMPLATES 中,取决于django版本,而django1.8以上版本已经集成为django.templ原创 2017-03-10 10:45:52 · 995 阅读 · 0 评论 -
python(django) 国际化翻译详细总结
1.在没有使用Python的web项目的框架的时候,解决方法如下: a)使用翻译模块 i.translate模块 默认一天限制1000词翻译一天,默认被翻译语言为英文,默认翻译成语言为简体中文。 安装:pip install translate使用:from translate import Translatortranslator= Translator(to_lang="zh")t原创 2017-03-27 16:56:08 · 2359 阅读 · 0 评论 -
django静态文件配置settings.py
Static files (CSS, JavaScript, Images)https://docs.djangoproject.com/en/1.8/howto/static-files/STATIC_URL = '/static/'当运行 python manage.py collectstatic 的时候STATIC_ROOT 文件夹 是用来将所有STATICFILES_DIRS中所有文件夹中原创 2017-03-10 10:52:28 · 347 阅读 · 0 评论