2016年7月7日 星期四

django tutorial

installation :

pip install Django 

django-admin startproject mysite

python manage.py migrate

python manage.py runserver



  • manage.py: A command-line utility 
  •  mysite/ directory is the Python package for the project. Its name is the Python package name you’ll need to use to import anything inside it (e.g. mysite.urls).
  • mysite/__init__.py: An empty file, considered a Python package.
  • mysite/settings.py: Settings/configuration
  • mysite/urls.py: The URL declarations for this Django project; a “table of contents” of your Django-powered site. You can read more about URLs in URL dispatcher.
  • mysite/wsgi.py: An entry-point for WSGI-compatible web servers to serve your project. See How to deploy with WSGI for more details.


model - migrate 
DB





Module, package:

沒有留言:

張貼留言