Difference between revisions of "Django"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) |
||
| Line 8: | Line 8: | ||
==== Create project ==== | ==== Create project ==== | ||
<nowiki>django-admin.py startproject mysite</nowiki> | <nowiki>django-admin.py startproject mysite</nowiki> | ||
| + | |||
| + | ==== Database Setup ==== | ||
| + | Edit: mysite/settings.py | ||
| + | |||
| + | In DATABASES = {... | ||
| + | * ENGINE – Either 'django.db.backends.sqlite3', 'django.db.backends.postgresql_psycopg2', 'django.db.backends.mysql', or 'django.db.backends.oracle'. | ||
| + | *NAME – The name of your database. | ||
| + | *USER – Username for the database. | ||
| + | *PASSWORD – Password for the database. | ||
| + | *HOST – Database HOST. | ||
Revision as of 23:13, 15 March 2015
Requirements:
- Python
- Database (MySQL / PostgreSQL...)
Installation:
pip install django
Create project
django-admin.py startproject mysite
Database Setup
Edit: mysite/settings.py
In DATABASES = {...
- ENGINE – Either 'django.db.backends.sqlite3', 'django.db.backends.postgresql_psycopg2', 'django.db.backends.mysql', or 'django.db.backends.oracle'.
- NAME – The name of your database.
- USER – Username for the database.
- PASSWORD – Password for the database.
- HOST – Database HOST.