if you want to change the server's IP,pass it along with the port.
So to listen on all public IPs,use: python manage.py runserver 0.0.0.0:8000urls.py
正则判断import time
print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime())settings.py
TIME_ZONE = 'Asia/Shanghai'setting.py
'ENGINE':'django.db.backends.mysql', 'NAME':'', 'USER':'', 'PASSWORD':'', 'HOST':'', 'PORT':'',检查数据库配置
python manage.py shell from django.db import connection cursor = connection.cursor()检查模型是否正确
python manage.py validate提交SQL语句到数据库
python manage.py syncdbmodel下所有
BlogPost.objects.all()限制条件,只找出title='test'
BlogPost.objects.filter(title='test')只找出单个数据
BlogPost.objects.get(title='test')