django
rwen001
cookbook
展开
-
django自带的server能让外网主机访问
http://hi.baidu.com/xiaoxifeng_01/item/a030163c2434c5e1392ffa05django自带的server能让外网主机访问django自带的server能让外网主机访问django自带的server能让外网主机访问命令:python manage.py runserver 9.115.120.81:8转载 2013-09-29 16:30:25 · 19375 阅读 · 2 评论 -
'module' object has no attribute 'rindex'
最近做一个django的项目,在进入django 的admin界面时老是报如下错误:AttributeError at /admin/'module' object has no attribute 'rindex'真是非常恼人,在stackoverflow上面找了半天,都没有解决我的问题,粗略看报错信息也毫无结果,真是想死的心都有了。早就听说djang原创 2014-01-16 14:47:12 · 3215 阅读 · 0 评论 -
unknown encoding: cp0
在django有自动定时任务,有时会抛出这样的错误:unknown encoding: cp0原创 2014-07-23 13:55:20 · 7885 阅读 · 0 评论 -
ImportError: No module named _sqlite3
I had the same problem (building python2.5 from source on Ubuntu Lucid), andimport sqlite3 threw this same exception. I've installed libsqlite3-dev from the package manager, recompiled python2.5, an转载 2014-09-19 11:38:41 · 2964 阅读 · 0 评论 -
Django异常 - ImportError: No module named django.core.management
Django错误 - ImportError: No module named django.core.management问题描述:在命令行输入 manage.py runserver,提示找不到django.core.management模块。问题分析:1. 确定Django已安装,进行Django的安装目录查看,django.core.management确实存在2.转载 2014-08-18 22:11:52 · 1727 阅读 · 0 评论 -
django改变或添加admin后台的用户密码
>>> from django.contrib.auth.models import User>>> u = User.objects.get(username__exact='john')>>> u.set_password('new password')>>> u.save()原创 2014-09-03 17:21:04 · 9302 阅读 · 1 评论 -
django admin
http://stackoverflow.com/questions/163823/can-list-display-in-a-django-modeladmin-display-attributes-of-foreignkey-fieldclass UserAdmin(admin.ModelAdmin): list_display = (..., 'get_author')转载 2014-11-13 12:27:02 · 788 阅读 · 0 评论 -
Standalone Django scripts 运行单独的django脚本
Standalone Django scriptsPublished September 22, 2007. Filed under: Django.In the grand tradition of providing answers to frequently-asked questions from the django-users mailing list and the转载 2014-11-21 22:28:22 · 1957 阅读 · 0 评论 -
How To Install and Configure Django with Postgres, Nginx, and Gunicorn
from: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-django-with-postgres-nginx-and-gunicornPrerequisitesThis tutorial assumes you have already set up转载 2016-01-10 09:25:00 · 730 阅读 · 0 评论