Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Django: Web Framework for Perfectionists

A513bc1fa519d2fcf5e4e0d9b5500101?s=47 Sibi
June 08, 2013

Django: Web Framework for Perfectionists

A513bc1fa519d2fcf5e4e0d9b5500101?s=128

Sibi

June 08, 2013
Tweet

Transcript

  1. DJANGO: Web Framework for Perfectionists

  2. Formal boring Introduction Equipped with: ORM Administration Site Development tools

    Templates Form Validation Authentication Pluggable ...
  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
  5. Models ???

  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
  8. Some tweaking • STATICFILES_DIRS • TEMPLATE_DIRS

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

  10. MTV (2)...

  11. Thank You! • Find the demo code at https://github.com/psibi/ilugc-talk-django •

    Contact mail: sibi@psibi.in • QUESTIONS ???