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

Things I wish I'd known about Django

Things I wish I'd known about Django

James Cooke

July 14, 2015
Tweet

More Decks by James Cooke

Other Decks in Programming

Transcript

  1. Things I wish I’d
    known about Django
    A talk all about me (sorry)
    James Cooke // The London Django Meetup

    View Slide

  2. About me
    ● Backend developer
    ● Accidental web dev:
    o Five years of PHP
    o Four years of Piotr saying “check out Django”
    o Client driven dev
    o Learning / experimentation debt
    ● Django was my first experience of Python

    View Slide

  3. Better Python > Better Django
    ● “Magic” Django functions are just powerful
    Python features.
    ● Accessors, decorators, comprehensions and
    generators.

    View Slide

  4. Deployment isn’t `scp`
    ● Non-trivial deployment. File-orientated is
    not enough.
    ● modpython support deprecated when I
    started.
    ● WSGI needs some workers - you’re a
    devops now :D

    View Slide

  5. Django’s not rails
    Adjusting how your Django install works is
    standard and expected. e.g:
    ● Use other libraries.
    ● Extend ORM / object managers.
    ● Templating.
    ● Class based views.

    View Slide

  6. Django lets me screw up my data
    `Model.save != Model.full_clean`
    Many routes data can take into DB:
    ● Form validation in view
    ● View code building objects
    ● Data migrations
    ● Ad hoc queries in shell.

    View Slide

  7. Point five
    `from django.test import TestCase`

    View Slide

  8. Community
    If I’d know it was this good I’d have been here
    sooner:
    ● Great plugins / tools: South, Mezzanine /
    CMS, caches, integrations.
    ● High quality community answers
    ● Generally built on strong Python
    community (I think)

    View Slide

  9. Summary
    ● If you’re new: Jump in (sooner)
    ● If you’re here now: Don’t fear the magic (use
    the source)
    ● If you’re pro: Spread the word :D
    Thanks… got questions?
    @jamesfublo

    View Slide