Ray's playground

 

Getting Started(The Definitive Guild to Django)

  Django only supports python 2.4 to python 2.6.

  If you run "python setup.py install" with python 3.0+ installed, you will get error like "u'SVN' syntax error".

  After running "django-admin.py startproject mysite", you will get four files.

  • __init__.py: A file required for Python to treat the mysite directory as a package (a group of Python modules). It’s an empty file, and you normally won’t add anything to it.

  • manage.py: A command-line utility that lets you interact with this Django project in various ways. Type python manage.py help to get a feel for what it can do. You should never have to edit this file; it’s created in the directory purely for convenience.

  • settings.py: Settings/configuration for this Django project. Take a look at it to get an idea of the types of settings available, along with their default values.

  • urls.py: The URLs for this Django project. Think of it as the “table of contents” of your Django-powered site. At the moment, it’s empty. 

posted on 2010-03-25 17:48  Ray Z  阅读(245)  评论(0编辑  收藏  举报

导航