Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Open Source Communities
Open source projects should be judged as much by their community as by their technological achievements. The code tells you what it’s good for, but the community tells you what its future is. Communities need to be active to continue improving the project, deal with bugs and changes to their ecosystem. If no one is [...] -
Django Site of the Week - ShutterCal
ShutterCal is a photo sharing site with a difference - it encourages contributors to upload one photo every day to help people reach a goal: whether that may be to improve their photography, watch themselves evolve over a year, or remember people and places they visit. ShutterCal started in 2007, and this week I spoke to developer Dan Ferrante to find out why he chose Django, some of the challenges he's faced, and how he uses Django and other open-source software to make his life easier. You can read more over at the Django Site of the Week. -
Django Site of the Week - ShutterCal
ShutterCal is a photo sharing site with a difference - it encourages contributors to upload one photo every day to help people reach a goal: whether that may be to improve their photography, watch themselves evolve over a year, or remember people and places they visit. ShutterCal started in 2007, and … -
Django 2.0
So apparently some folks doing business as “Vyper Logix Corp” are peddling a thing they call “Django 2.0”. I’m not going to link it here since they don’t deserve the Google bump, but if you’re interested you can follow the link in Jannis’ tweet where he mentioned it. In fact, with any luck my Google juice will pop this article up above them. “Django 2.0” is, apparently, built on the Django 0.96 ... Read full entry -
Django vs Rails: The Dead-Tree Edition
Django Rails In Conclusion The difference speaks for itself. I’ll write about why this matters tomorrow. (Yeah, I used the Fancy Link Builder I posted yesterday about. It was infuriating to use, it has whiz-bang Javascript to open a product detail lightbox that served only to make it nearly impossible to copy cover images. New [...] -
Django 2.0
So apparently some folks doing business as “Vyper Logix Corp” are peddling a thing they call “Django 2.0”. I’m not going to link it here since they don’t deserve the Google bump, but if you’re interested you can follow the link in Jannis’ tweet where he mentioned it. In fact, with any luck my Google juice will pop this article up above them. “Django 2.0” is, apparently, built on the ... Read full entry and comments -
I'm lazier then django forms
When I started to learn django, i fell in love with django forms, or newforms as it was called then. It made writing forms a lot more enjoyable. So like many relationship, it started out great, we, (me and django forms), were having a great time together, having fun spending a lot of time together, great. Then we started to get serious and that’s when things became more complicated. I found myself using copy and paste a lot, from one form to another form. Sure it did the job, but it required more effort then I wanted to give. I had to give it a couple looks each time to ensure everything was correct. It got tedious, and i have to blame django forms for this. It has spoiled me, making things to easy to use. I can’t imagine trying to write out forms like I once did in .NET. So as our relationship continued we found our selves in the same cycle, everything the same. But I wanted more, I wanted to us to be in love again. Like we were when we first meet. Solution - Form Options class FormOptions(): """ FormOptions class gives Form extra properties so we can build a … -
Django SOTW Moving to Mondays
To better fit with both my own way of doing things and with general web browsing patterns of the Django SOTW public, I'm moving the SOTW to Mondays rather than Saturdays. You can expect new interviews to go live on Monday evenings (Australian EST) which means our US visitors should see them in their RSS feeds first thing Monday morning. Also, I've finally succumbed to the forces and I've joined Twitter so you if that's your kinda thing then come and say hi! -
Django SOTW Moving to Mondays
To better fit with both my own way of doing things and with general web browsing patterns of the Django SOTW public, I'm moving the SOTW to Mondays rather than Saturdays. You can expect new interviews to go live on Monday evenings (Australian EST) which means our US visitors should … -
Django ma teraz szybsze testy
Do trunk'owej wersji Django został zakomitowany mechanizm testów działający na transakcjach, przyśpiesza wykonywanie testów o ok. 8 do 40 razy. Funkcjonalność ta znajdzie się w wersji Django 1.1 która będzie wydana marcu. Aby skorzystać z tej funkcjonalność należy używać silnika baz danych który obsługuje tranzakacje. Mam nadzieję że teraz już nikt nie będzie miał wymówek aby nie pisać testów :) -
Джанговские агрегации
Сделали: http://docs.djangoproject.com/en/dev/topics/db/aggregation/! Особо приглянувшиеся мне вещи: Store.objects.annotate(Count('books__authors')) Store — это магазин, у него many-to-many на Book, у которого есть many-to-many на Author. Тут делается join по всем нужным таблицам и group by на них. Book.objects.annotate(num_authors=Count('authors')).filter(num_authors__gt=1) Я очень рад, что having не стали делать отдельным понятием. Это просто фильтр. А уж ... -
From WordPress to Django – Part 1
Now don't get me wrong, there's nothing wrong with Wordpress. It's just that I like to play with stuff, so I thought it would be fun to create a blog in Django, copy all my Wordpress posts across, and add at least some of the functionality that Wordpress has built in. -
Washington Post Update
It’s been a long time since I’ve written about what I’ve been up to at the Washington Post, so let me run down the apps I’ve worked on since September 2007 in roughly linear order. Lots of these apps link different places, so if you don’t see projects.washingtonpost.com at the start of the URL, you’ve [...] -
Изменённые данные в форме
Когда-то я придумал для своего багтракинга фичу, которая мне казалась уникальной для багтракингов. Фича связана с тем, как обрабатываются изменения, которые человек сохраняет в тикет, в то время, как тикет уже успел поменяться кем-то другим за время с момента открытия того в окне браузера. И вот на днях, в процессе ... -
Django Gotcha: Never set a variable called ‘user’ in your RequestContext
Okay. So I was working on some view code in a Django project and I noticed something weird. The view started rendering as if the user was no longer logged in. Odd thing was that it was only doing that for that one view. I banged my head for a while and then I realized […] -
Descriptivists and Prescriptivists
In the world of grammarians there are two competing camps: descriptivists and prescriptivists. Edward Finegan of the University of Southern California sums up the difference: Descriptive grammarians ask the question, “What is English (or another language) like – what are its forms and how do they function in various situations?” By contrast, prescriptive grammarians ask “What should English be like – what forms should people use and what functions should they serve? -
Generic Collections in Django
Django‘s generic relations are a great way to connect an object to any other type of object. Django provides a GenericForeignKey field to connect one object to any other object. For a recent project I needed to create a Many-to-Many relationship between an object and certain types of other objects, and have them editable in the admin. Here’s how I did it. The Models For this example we’ll create several simple models. class Photo(models.Model): "A simple photo model" title = models.CharField(max_length=50) image = models.ImageField(upload_to='img/photos/%Y/%m/%d') class Audio(models.Model): "A simple audio model" title = models.CharField(max_length=50) image = models.ImageField(upload_to='audio/%Y/%m/%d') class Link(models.Model): "A simple link model" title = models.CharField(max_length=50) link = models.URLField() class BlogEntry(models.Model): "A simple Blog Entry model" title = models.CharField(max_length=50) slug = models.SlugField(max_length=50) body = models.TextField() Now let’s find a way to relate any number of these objects to a single Blog Entry. To do that we are going to need an intermediary table that will handle the relations. blogentryrelation_limits = {'model_in':('photo', 'audio', 'link', 'blogentry')} class BlogEntryRelation(models.Model): "A simple photo model" blogentry = models.ForeignKey(BlogEntry) content_type = models.ForeignKey(ContentType, limit_choices_to=blogentryrelation_limits) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey('content_type', 'object_id') The blogentryrelation_limits variable enables you to allow the selection of certain models in the admin. The Admin To see everything properly in the … -
Sprint de de Traduccion de documentacion de django terminado
Este fin de semana fue el sprint de traduccion de la documentacion de django al español. La verdad fue muy bueno participar e intentar retribuir de cierta manera todo lo que este framework nos dio. Me senti peculiarmente emocionado de estar entre la lista de los colaboradores. Ayer terminó el sprint de traducción. En estos [...] -
StdImage updated to trunk
Everything is changing on Django those days, and many people contacted me because StdImage stopped working with trunk.Basically all major changes (except GeoDjango) affected it, such as change from newforms to forms, signal refactoring, and file storage refactoring. Now it's up to date.Remind that django-stdimage is a Django application that provides a standardized image field(standard name including row id, standard size, and ability to create automatic thumbnails, also standarized of course). -
Translating Django apps. Good practices
In this article you'll find some tips, that could be useful for avoiding problems or extra work when translating your Django application.1. Setting up the environmentDoing some trivial changes to your project structure, can avoid you of translating many string (the ones that are already translated in Django, or in any external application).For achieving it, my tip is to copy Django itself, and all external applications to your project path, not in a PYTHONPATH directory. It can also avoid compatibility problems, and version conflicts if you're working on several projects. Then your project root will contain something like:__init__.pysettings.pyurls.pydjango/transdb/myapp/Next step is patching Django (while it's not included in trunk) to omit the inclusion of already translated applications into your project. Here is the patch, and you can also see #7050 for further information, or know the status.Then, when executing ./manage.py makemessages you'll find in your project catalogs, just strings that aren't previously translated.2. Creating stringIf you don't have a correct literal creation policy, then your translator will have extra work, problems, and your translation won't be as correct as it should.The first thing to do is write literals thinking in reusability (as software reusability but for translations). I'll show it with … -
DSNP 0.9 released
I know that it was just few days ago that I released another version of DSNP, but because of it, I got a lot of feedback on it, I worked hard, and finally DSNP is stable.For now, it'll be 0.9 because it works on Django newforms-admin branch, so 1.0 will be reached when newforms-admin will be merged into trunk.Changeset for this version is next: Generated sqlite file has write permissions for all users by default Static files are served by Django http server on development environment (DEBUG==True) File admin.py created to specify admin options Media path has changed (now, all static files are under "media" directory) due to an issueI hope you like it. -
DjangoCon is still alive?
On July 13th, DjangoCon 2008 was announced, and the illusion and nervousness started for many djangonauts. The main problem here, is that due to the lack of time and experience, the number of attendees is limited to 200. That makes sense, but there are other things that doesn't make sense to me. This post is about that, and it's intended to be a kind of constructive criticism.The fact is that many people is waiting to know if he/she can get a ticket to start planning the trip to SF, ans specially to purchase flight tickets. In those two weeks since DjangoCon announcement, flight prices from Barcelona to SF have increased in a 30%. I don't think it's the only case.My question is... It is so difficult to develop and run an application to register users, letting many djangonauts to save some money that could be given to the DSF? :) Are you coding it in PHP? ;)Seriously, if you need help, just ask for it, we are a community. But please, stop delaying ticket releasing, we have to get our tickets, make our plans, and we don't want to waste our money getting last time flight tickets. IMHO ticket realising … -
Changing language on the admin
When working on multilanguage sites, a feature that many times I missed is a direct way to change the language when you're on the admin,With standard Django the only way that exists (as far as I know), is leaving the admin, going to the website, change the language there, and come back to the admin. Not very fast.Today, I've created a snippet that creates a drop down menu on the admin bar (just in the main page) to change the language.Hope it helps. -
StdImageField: Improved image field for Django
I'm pleased to announce a new project, django-stdimage, that provides a new image field with many improvements respect to Django's core ImageField.Features of StdImageField: Saved files have standardized names (using field name and object id) Images can be removed Automatically creates a thumbnail Automatically resizes both image and thumbnail (with optional crop to fit exactly specified size)Here you've an example of usage:from django.db import modelsfrom stdimage import StdImageFieldclass MyClass(models.Model): my_image = StdImageField(upload_to='path/to/img', blank=True, \ size=(640, 480), thumbnail_size=(100, 100, True))If a file called "uploaded_file.png" is uploaded for object id 34, then result will be: /path/to/img/my_image_34.png (with bigger possible size to fit in a 640x480 area) /path/to/img/my_image_34.thumbnail.png (with a exact size of 100x100, cropping if necessary)Also it will appear a check-box for deleting when using admin. -
TransDb working on trunk!
Some days ago, after the merge of qs-rf to trunk, model field i18n was in trouble, so the principal package for this approach (django-multilingual) stopped working for the latest version of trunk.This weekend we had a TransDb sprint, to try to improve our project, and contribute to fix this situation in any way.The result: We fixed many issues on TransDb, now the project has a more conventional structure, and a setup script, and... TransDb is now working on trunk!For achieving it we created a new branch called oldforms.Try it now!