3. Ladies And Gentlemen
● Start your project, by this command:
django-admin.py startproject project_name
● Some new files are generated:
– __init__.py
– manage.py
– settings.py
– urls.py
4. Create your application within
your Project
● python manage.py startapp app_name
● Include your app in the project by modifying
settings.py
6. Models... (2)
● Ok, it's not related to fashion models.
● Model refers to the data access layer ( database)
● Example of a django model:
class post(models.Model):
author = models.CharField(max_length = 30)
title = models.CharField(max_length = 300)
bodytext = models.TextField()
7. Connecting DB to your Django
Project
● Alter settings.py
● python manage.py syncdb