Django

2013/04/05 Python

License: (CC 3.0) BY-NC-SA

Reference

  1. https://www.djangoproject.com/
  2. djangobook djangobook on github
  3. 1.5 tutorail01
  4. 1.5 tutorail02
  5. 1.5 tutorail03
  6. 1.5 tutorail04
  7. 1.5 tutorail05
  8. 1.5 tutorail06
  9. release your app

Install Django

uninstall django

  • pip uninstall django
  • python -c "import sys; sys.path = sys.path[1:]; import django; print(django.__path__)" then remove the dir

install

  1. git clone git://github.com/django/django.git django-trunk
  2. sudo pip install -e django-trunk/

create a project

  1. django-admin.py startproject mysite
  2. cd mysite && python manage.py runserver 8000

you can modify the timezone in your project’s setting file: sed -i "s/\(TIME_ZONE = \).*/\1\"Asia\/Shanghai\"/" greeTree/settings.py

database initialization

  1. python manage.py syncdb

start app

  1. python manage.py startapp polls

Search

    Table of Contents