Difference between revisions of "Django"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) |
||
| Line 36: | Line 36: | ||
==== Usefull packages ==== | ==== Usefull packages ==== | ||
| − | [http://django-allauth.readthedocs.org/en/latest/showcase.html User Registration] | + | ===== Django Allouth ===== |
| + | [http://django-allauth.readthedocs.org/en/latest/showcase.html User Registration]<br /> | ||
| + | [http://www.sarahhagstrom.com/2013/09/the-missing-django-allauth-tutorial/ Allouth Tutorial] | ||
| − | Not working in Django 1.7 | + | Not working in Django 1.7<br> |
[http://django-registration.readthedocs.org/en/latest/quickstart.html User registration]<br> | [http://django-registration.readthedocs.org/en/latest/quickstart.html User registration]<br> | ||
[https://devdoodles.wordpress.com/2009/02/16/user-authentication-with-django-registration/ Django registration step by step] | [https://devdoodles.wordpress.com/2009/02/16/user-authentication-with-django-registration/ Django registration step by step] | ||
Revision as of 01:48, 16 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.
To create the database tables execute from the project folder:
python manage.py migrate
Run App in development server
If the server is an amazon aws:
python manage.py runserver 0.0.0.0:8000
Else:
python manage.py runserver
Create an app
python manage.py startapp appname
Create admin user
python manage.py createsuperuser access at http://serverurl:8000/admin
Usefull packages
Django Allouth
User Registration
Allouth Tutorial
Not working in Django 1.7
User registration
Django registration step by step