~/talk

Demystifying Mixins with Django

Talkat EuroPython 2015 · 2015-07-20..07-26· [python]
slides:none on file

Mixins are ordinary Python classes not magic and work by wiring behavior into Django class based views; a concrete login required mixin is implemented by overriding dispatch override to raise PermissionDenied and then calling super which actually protects pages; external packages like Django Braces and upcoming Django 1.9 mixins replace most handrolled code; a demo shows a dynamic class swap that mutates instances (works differently in Python 2 vs 3) and warns that two mixins is common while six becomes a nightmare.

AI-written summary · about

  1. 0:00Start
  2. 1:51When to use mixins?
  3. 2:03Properties
  4. 3:42base class
  5. 12:09django-braces
  6. 12:41Decorators
  7. 13:01Good news everyone!
  8. 13:41Runtime magic
  9. 16:52Recap
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.