django初体验-网站sample

本文章属于学习摘记

django-admin.py startproject mysite(网站名称)

Let’s look at what startproject created:

mysite/
    __init__.py
    manage.py
    settings.py
    urls.py

python manage.py runserver

You'll see the following output on the command line:

Validating models...
0 errors found.

Django version 1.0, using settings 'mysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Now that the server's running, visit http://127.0.0.1:8000/ with your Web browser. You'll see a "Welcome to Django" page, in pleasant, light-blue pastel. It worked!

生成sql语句

python manage.py sql polls
生成数据库

python manage.py syncdb

/usr/local/lib/python2.7/site-packages/django/contrib/admin/templates/admin

你可能感兴趣的:(sql,server,python,django,command,polls)