Django
Permission required decorator for django
Very long time since last post. The new thing in my geek life is I’ve switched to Django.
My last issue today was to display an error message instead of redirecting to login page when the use doesn’t have permission. Here is a decorator which replace the permission_required of django. Feel free to rename it to avoid confusion
Cherokee, to deploy and serve faster
I’ve been deploying a new Django application at work with Apache and mod_wsgi (it’s now the recommended way, instead of mod_python) but that still painful and slow to serve static content.
![]()
A new paster's http factory on fire: dj.paste
I made for a workmate yet another django paste's http factory.
The goals were to integrate its way to work, with setting some DJANGO_SETTINGS_MODULE key in the environment and launch the "bidule", and letz play.
The challenge was, ..., to be simple or this workmate will never use this stuff. She was used to tell only about django-admin runserver :).
One part of the challenge was to show some interessant things that we can do with paste configurations, like having different but closer configurations for production or development mode.
minitage 1.0 is out
I did not find the time earlier to post about it.
Minitage 1.0 is out for a week now.
Limitations of the Django ORM (1.0) in model inheritance
Vertimus has been merged with Damned-Lies and it’s wonderful to see how a tiny project is able to receive as much coverage and talks (in geek circles only of course, GNOME Commit Digest 13, planet, GNOME i18n list). I’ve been spending more time that I’ve estimated because of Django ORM limitations.
Web translations
Almost nothing on GNOME French translations front but I’ve updated the translations of a few Web applications:
- roundup (in bug tracker for now)
- FormEncode
- Drupal 5
- TurboGears (in JS)
Claude and me are working to improve the new Damned-Lies, it’s really fun to develop this application with Django.
Database performance in Web applications
It’s more efficient to connect a Web application with an Unix Domain
Socket than TCP/IP one (reduced overhead) so I’ll explain the required
configuration with the following pairs:
1 - TurboGears/SQLAlchemy
2 - Django/PostgreSQL
3 - Django/MySQL
1 - TurboGears/SA
SQLObject is dead, isn’t it? So With SQLalchemy, the syntax is: