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

Django Through The Years

Django Through The Years

A talk I gave at DjangoCon US 2022.

Andrew Godwin

October 18, 2022
Tweet

More Decks by Andrew Godwin

Other Decks in Programming

Transcript

  1. Andrew Godwin / @andrewgodwin Hi, I’m Andrew Godwin • Principal

    Engineer at Astronomer (w/on Airflow) • Django Migrations, Channels & Async • Doing odd things with Django since 2006
  2. Andrew Godwin / @andrewgodwin I love a nice, relaxing conference

    Sitting back, chatting to people, doing a panel tomorrow
  3. Andrew Godwin / @andrewgodwin I've been using Django since 2006

    Yes, that is almost half my life now. Don't remind me.
  4. Andrew Godwin / @andrewgodwin I've been attending DjangoCon since 2008

    That first one was a transformative experience in my life!
  5. Andrew Godwin / @andrewgodwin Django was different back then… Here's

    some highlights from the 1.0 release, right before DjangoCon 2008
  6. Andrew Godwin / @andrewgodwin No multiple databases Dumb SQL generation

    Cookie-based sessions No good debugging tools No migration system Not smug enough
  7. Andrew Godwin / @andrewgodwin No multiple databases Dumb SQL generation

    Cookie-based sessions No good debugging tools No migration system Not smug enough
  8. Andrew Godwin / @andrewgodwin No multiple databases Dumb SQL generation

    Cookie-based sessions No good debugging tools No migration system Not smug enough
  9. Andrew Godwin / @andrewgodwin South (Because birds migrate south in

    the winter) (It takes some people years and years to realise this)
  10. Andrew Godwin / @andrewgodwin Now, it Just Works™ (I have

    to use Alembic at work right now and I'm missing Django)
  11. Andrew Godwin / @andrewgodwin The Web went all-in on SPAs

    But it seems that wasn't the right choice for everything…
  12. Andrew Godwin / @andrewgodwin Django Rest Framework is good… …but

    I think FastAPI and Pydantic have some nice ideas too
  13. Andrew Godwin / @andrewgodwin HTMX shows us a different way

    (I've tried, I'm just not a React/Vue/etc. person)
  14. Andrew Godwin / @andrewgodwin <form id="print-form" action="." method="post" hx-post="." hx-swap="outerHTML"

    hx-trigger="change"> {% csrf_token %} {{ form|crispy }} <input type="submit" value="Next Step"> </form>
  15. Andrew Godwin / @andrewgodwin def create_print(request): if request.method == "POST":

    form = PrintForm(request.POST) if form.is_valid(): if not request.htmx: # Do stuff else: form = PrintForm() if request.htmx: return render(request, "create/_print_form.html", {"form": form}) else: return render(request, "create/print.html", {"form": form})
  16. Andrew Godwin / @andrewgodwin First-party API framework Inspired by DRF,

    FastAPI and others HTMX templating and form handling Doesn't have to be first-party, already some plugins Separately-useable ORM? I literally first heard this idea at DjangoCon in 2008
  17. Andrew Godwin / @andrewgodwin But that's just what I want

    Django's best when we all work together and balance needs
  18. Andrew Godwin / @andrewgodwin Big features are driven by individuals

    They need someone to take the wheel and work to a vision