摘要:
In 1.10, you can no longer pass import paths to url(), you need to pass the actual view function: 在django 1.10 里面urls.py 新的写法: urls.py 文件里添加blog的url: 阅读全文
摘要:
The use of patterns is deprecated in Django1.10. Therefore do not import 'patterns' and your url pattern should be as follows: 这个特性在1.9就声明了deprecated. 阅读全文
摘要:
IOError: No translation files found for default language zh-cn. 检查 ...\Lib\site-packages\Django-1.10.2-py2.7.egg\django\conf\locale下无zh-cn文件夹,有zh-Hans 阅读全文
摘要:
formtools not supported the Django 1.10 version please downgrade your Django release for the workaround. https://github.com/django/django-formtools/is 阅读全文
摘要:
配置如下,settings中配置: EMAIL_HOST = 'smtp.163.com' EMAIL_PORT = '25' EMAIL_HOST_USER = 'contact108@163.com' EMAIL_HOST_PASSWORD = '******' # 填密码 然后调用send_m 阅读全文
摘要:
首先找到django安装路径 Python import sys; sys.path = sys.path[1:]; import django; print(django.__path__) 得到 django 安装目录 ['/Library/python/2.7/site-packages/dj 阅读全文
摘要:
How to find the site-packages folder in Python? 在Mac OS或者Linux中比较有用,因为这些系统一般都同时安装了多个版本。尤其是Mac OS 10.5,目录结构太乱了 在python环境中: from distutils.sysconfig imp 阅读全文