码迷,mamicode.com
首页 > 其他好文 > 详细

django demo

时间:2016-07-16 06:47:42      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:

1.

$ django-admin startproject mysite

 2.

$ python manage.py runserver

 3.

$ python manage.py migrate

 4.

$ python manage.py makemigrations polls

 5.

$ python manage.py sqlmigrate polls 0001

 6.

$ python manage.py migrate

 

Migrations are very powerful and let you change your models over time, as you develop your project, without the need to delete your database or tables and make new ones - it specializes in upgrading your database live, without losing data. We’ll cover them in more depth in a later part of the tutorial, but for now, remember the three-step guide to making model changes:

The url() function is passed four arguments, two required: regex and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for.

 

django demo

标签:

原文地址:http://www.cnblogs.com/seemann/p/5675146.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!