3 ms·
Interesting, my fairly large django project uses none of those. Instead, the addons we consider to be critical are these these: django-debreach django-
by falcolas 13y ago
Interesting, my fairly large django project uses none of those. Instead, the addons we consider to be critical are these these:
django-debreach
django-redis
jinja2
pytz
Redis for queues and caching, debreach to secure the CSRF tokens and vary your content length to avoid the BREACH vulnerability. jinja2 for doing templates outside of returning data, and pytz so you can use timezones in your data models.
I also recommend installing `flup` and running via fastcgi, but that's open to interpretation.
- belluchan 13y agoDoes django-redis block? I'm not sure I'd make a connection from django to anything other than a low latency queue.
- conesus 13y agoI think Redis fits your definition of low latency queue. It does in my book, and I run a few thousand concurrent connections to Redis from Django. I also endorse django-redis and use it for caching, pub sub, and various data types. See https://github.com/samuelclay/NewsBlur/blob/master/settings.py#L584-L597 https://github.com/samuelclay/NewsBlur/blob/master/settings.... for my redis configuration. I also use django-redis for caching (which is higher up in that file).
- falcolas 13y agoYes, but then again so do the underlying mysql connections. It does use native python sockets, so gevent.monkeypatch would probably work. Blocking is one of the reasons I use flup and fastcgi - it doesn't matter if one thread of execution blocks; it won't affect any other requests. I've tested this under load with some really gnarly queries, and it works fantastically.
- oinksoft 13y agopytz probably doesn't belong in a discussion of Django libraries. It's needed by pretty much any Python program that works with localized datetimes. > jinja2 for doing templates outside of returning data What do you mean?
- spamizbad 13y agoI assume for things like templating emails. Or configuration files for deployment. That's at least what I've used it for. It's handier and more straight-forward than using Django's templating engine.
- oinksoft 13y agoI thought he might have meant that, but I never had too much difficulty doing this through the Django template API.
- falcolas 13y agoIt's not bad, but the Jinja2 language is more expressive, and the API is a bit better. Not enough we would migrate away from Django templates to it, but enough to not migrate away from Jinja.
- oinksoft 13y agoFair enough, I tend to use something very restrictive like Django templates (I made/use an Erlang port of the language as well: https://github.com/oinksoft/dtl https://github.com/oinksoft/dtl) or something very flexible like Mako if I have the choice and need it.