Slide 1

Slide 1 text

DJANGO: Web Framework for Perfectionists

Slide 2

Slide 2 text

Formal boring Introduction Equipped with: ORM Administration Site Development tools Templates Form Validation Authentication Pluggable ...

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Create your application within your Project ● python manage.py startapp app_name ● Include your app in the project by modifying settings.py

Slide 5

Slide 5 text

Models ???

Slide 6

Slide 6 text

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()

Slide 7

Slide 7 text

Connecting DB to your Django Project ● Alter settings.py ● python manage.py syncdb

Slide 8

Slide 8 text

Some tweaking ● STATICFILES_DIRS ● TEMPLATE_DIRS

Slide 9

Slide 9 text

MTV ??? (Sigh.. bear with me)

Slide 10

Slide 10 text

MTV (2)...

Slide 11

Slide 11 text

Thank You! ● Find the demo code at https://github.com/psibi/ilugc-talk-django ● Contact mail: [email protected] ● QUESTIONS ???