Community
This page, updated every hour, aggregates blog entries by people who are
writing about Django.
Posted on February 9, 2010 at 2:58 PM by Ivan Sagalaev
По наводке Романа Ворушина почитал пост Дика Липтона о том, что в проекировании систем должны закладываться безопасные умолчания. И мне вспомнилась похожая штука из истории Джанго. Когда-то давно у модели пользователя был метод is_anonymous(), который предполагалось проверять в шаблонах для определения, что показывать незалогиненному пользователю: {% if user.is_anonymous %} Login...
Read this post in context »
Posted on February 9, 2010 at 3:24 AM by Lightning Fast Shop
After some long time, here are some updates about LFS: News: LFS moved to bitbucket: http://bitbucket.org/diefenbach/django-lfs/ Cleaned up documentation and added new stuff: http://packages.python.org/django-lfs/ New Code: Added vouchers Added redirects (based on Django's redirects app) Added pluggable templates (Jens Zeidler - iqplusplus) Added manufacturers (Michaela Hering - Demmelhuber) Added featured products (Michael Thornhill - Maithu IT Solutions) Added spain translations Added more tests New live shops: http://shop.fischer-jugend.de/ http://ethnochicbazar.com/ http://www.molloyspharmacy.com/ http://www.gadgeteria.ru/ There are some more in the pipe (we'll give an update soon) What's coming next: Michael is working hard on integration of country specific addresses based on django-countries and django-postal (we hope we are getting it out of the door soon) I made some tests with an GXT-based management interface: Screencast Better documentation for users and developers Having more lfs-fun :)
Read this post in context »
Posted on February 8, 2010 at 10:15 PM by Eric Florenzano
Asynchronous programming is superior both in memory usage and in overall throughput when compared to synchronous programming . We've known this fact for years. If we look at Django or Ruby on Rails, arguably the two most promising new web application frameworks to emerge in the past few years, both of them are written in such a way that synchronous programming is assumed. Why is it that even in 2010 we're still writing programs that rely on synchronous programming ? The reason that we're stuck on synchronous programming is twofold. Firstly, the programming model required for straightforward asynchronous implementations is inconvenient. Secondly, popular and/or mainstream languages lack the built-in language constructs that are needed to implement a less-straightforward approach to asynchronous programming. Asynchronous programming is too hard Let's first examine the straightforward implementation: an event loop. In this programming model, we have a single process with a single loop that runs continuously. Functionality is achieved by writing functions to execute small tasks quickly, and inserting those functions into that event loop. One of those functions might read some bytes from a socket, while another function might write a few bytes to a file, and yet another function might do something ...
Read this post in context »
Posted on February 8, 2010 at 1:00 PM by Matt Reiferson
I finally got around to setting up a more sophisticated deployment system for some of my apps. These apps include some built on a custom PHP framework and others that are Python / Django apps. I figured I'd share my experience... Why is a high-level deployment infrastructure important? Deployment is something that should [...] Related posts:Installing Ruby Enterprise Edition with Phusion Passenger 8 Books To Get A Developer For The Holidays Be Language Agnostic – Solve the Problem!
Read this post in context »
Posted on February 8, 2010 at 11:24 AM by Kevin Fricovsky
Extending my previous post The apps that power Django-Mingus, the best way to discuss what has changed in Mingus is to discuss the new apps. Well, wait just one second Ok, maybe the best way to begin is to quickly discuss a few higher level updates. The first, and one I'm very proud of, is that Mingus was recently added to Transifix and now has both Spanish and French translations included thus far. To be honest, Transifix wasn't the reason these two languages were added (two developers contributed them before Transifix came into the picture), but I can see it helping in getting the rest. Getting Mingus translated probably wouldn't have been possible if: I didn't focus on providing at least the basic pipeline for internationalization (templates, admin/models where possible) And if Pablo Marti and Florent Messa didn't come in and clean up where I left off. Thanks to those two Mingus now has Spanish and French translations. The fact is that so many apps (and I'm to blame here for some of my apps in the past as well) just don't do the basic i18n legwork that gets your app 80-90% of the way there. It's so easy, so ...
Read this post in context »
Posted on February 8, 2010 at 11:12 AM by Simon Willison
Integrate Tornado in Django. A handy ./manage.py runtornado management command for firing up a Tornado server that serves your Django application.
Read this post in context »
Posted on February 8, 2010 at 6:43 AM by Django Dose
If 24ways.org is "the advent calendar for web geeks" then DjangoAdvent is the advent calendar for Django geeks. Inspired by the many 'advent calendar' websites out there, DjangoAdvent is a series of articles about upcoming releases of the Django web framework. Right now it looks like there are 12 articles in the queue but I believe more may be coming. Excellent work Rob Hudson and Idan Gazit.
Read this post in context »
Posted on February 7, 2010 at 6:11 PM by Ivan Sagalaev
За выходные дописать до рабочего состояния не вышло, устал очень... Идея состоит в том, чтобы сделать персональный PSHB-хаб, который можно использовать в Джанго-проекте в связке с блогом, форумом и вообще чем угодно, что генерит новые записи. Хочется попробовать повозиться с PSHB в реальности и заодно поймать кайф от мгновенного появления ...
Read this post in context »
Posted on February 6, 2010 at 8:22 PM by Eric Holscher
There has been a recent discussion on the Django Developers mailing list about the role of designers in the Django community. I think that this is an interesting discussion that can come from this, and I would like to explain my thoughts on the issue. This discussion came up in the context of redesigning the Django Admin, which everyone knows and loves. The UI is growing a bit out-dated, and there was talk of working to clean it up. This then turned into a discussion about how design proposals and improvements aren't taken as seriously as they should be by the community. I think there are a number of reasons that this happens, and I would like to take a look at them. My purpose here is to start a discussion about how to better integrate designers into the community, because they are a vital part of making our world more beautiful and efficient. I don't trust myself to judge your work The normal process for changes that go into Django is that a proposal is sent to the mailing list. There is a discussion that happens around them, and then if the code is produced, and it works, it ...
Read this post in context »
Posted on February 6, 2010 at 9:43 AM by Hugo
Faster or Lazier Pagination - interessanter Ansatz, einfach nicht die Menge der Sätze ermitteln, sondern stattdessen eine Anzahl Seiten annehmen und diese aktualisieren wenn man auf spätere Seiten zugreift. Ein bischen ähnlich zu manchen Websites die nur einen Ausschnitt der Seitenliste als Navigation anbieten - dafür braucht man dann nicht wissen wie viele Seiten es wirklich sind. Google mogelt ja auch, in dem die Seitenanzahl maximal beschränkt wird. Für große Datenmengen mit langsamem count(*) sicherlich sehr sinnvoll und evtl. könnte man das auch kombinieren mit gecachten maximalen Seitenzahlen für verschiedene Queries, so das beim nächsten Mal die Vermutung über die Menge schon präziser ist.
Read this post in context »
Posted on February 6, 2010 at 4:07 AM by Josh VanderLinden
Part of the latest version of my site included the deployment of a mobile-friendly site. Up until recently, I hadn't even attempted to create a mobile site because I thought it would take more time than it was worth. I wanted something beyond just using CSS to hide certain elements on the page. I wanted to be able to break down the content of my site into its most basic pieces and...
Read this post in context »
Posted on February 6, 2010 at 3:43 AM by Charles Leifer
Object-oriented programming stresses the idea of code reuse, through concepts like inheritance and polymorphism. View programming in django can sometimes get a boost from class-based design.
Read this post in context »
Posted on February 5, 2010 at 11:42 AM by Eric Holscher
[This is part of the Large Problems in Django Series, see previous entries about: APIs, Search, and Database Migrations] Django is well known across the open source community for it's stellar documentation. While the tech behind the documentation plays only a little role in how good it is, the tools behind both Python and Django's documentation is Sphinx. It has become the defacto way to create documentation in the Python community, and there is a great reason why. Why use Sphinx It is becoming the defacto standard (Network Effects)One of the big reasons is because it is becoming the standard documentation tool in the Python community. Once your projects documentation is in Sphinx, most everyone will know how to contribute to it. You will also be able to contribute to other projects easily as well. You can look through the Python and Django docs for examples of how to do neat things, and it is really the best solution to the problem. It uses Restructured TextIf you are writing plain text about python, more than likely you should be using Restructured Text. All docstrings are parsed for it, and you only need to learn this one markup language for all ...
Read this post in context »
Posted on February 5, 2010 at 10:00 AM by Andy McKay
Or how to avoid slow counts in Postgres
Read this post in context »
Posted on February 5, 2010 at 9:47 AM by Marcin Mierzejewski
MongoEngine is a Document-Object Mapper for working with MongoDB from Python. It uses a simple declarative API, similar to that of the Django ORM
Read this post in context »