Django multi-tier
Click here to load reader
description
Transcript of Django multi-tier
Multi-tier Implementation
inDjango
Sebastien Mirolo@seabasscapoeira
djaodjin-saasSoftware-as-a-Service as a
Django App
Productized: HTTP Firewall
One Django Proxy Server,with runtime selection of:
- templates- database connections- urlresolvers
Disclaimer“In theory there is no difference between theory and practice. In practice there is.”
- Yogi Berra
PLEASE, DO TRY THIS AT HOME !
Runtime SelectionTemplates
• middleware• thread local• template loaders
Runtime Selection Databases
•middleware
•thread local
•database routers
•django.db.connections.databases
Runtime Selectionreverse(url_name)
LESSONS LEARNED Caching without a CacheManager is Evil.
def value(self):
if not has_attr(self, _value):
self._value = self.compute_value()
return self._value
The Entire Rendering Pipeline must be Configurable on a Request.
(not talked here) Class Views and Mixins are amazingly flexible.