Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
EuroPython 2008, day 1
After a long year of exiting projects and neverending days at the office, I found myself again from EuroPython conference at Vilnius. The first conference day was full of interesting happenings, mainly reviving old and creating new connections. For all the sessions I attended during the day, I made some notes on few of them. Here are some basic notes about selected ones: Build an App in a Week by Marcin Kaszynski favpico.com etc Suprisingly many of the attendees (about half) use Django Use aDjango admin for users, too (not only for admins) ”Commit early, commit often” Share code only via vcs Use conventions @with_template decorator Note: you can use admin docs (template name) Tests Do save time self.login(), get, find coverage.py Instant Django This talk was interesting but didn’t really give much new stuff (at least for me). There was a discussion about how it makes sense to use convention of naming templates like app/viewname.html but I pointed out that if you for some reason want to part from that convention (that I believe most Django developers use), you can just point Django admin site help section to your designer and just document the fact in your modeldocs. No … -
EuroPython 2008, day 3
For me, the main theme for the third and last day of the conference was Django. Day started with a session by Honza Král about Django newforms admin, which gave me a pretty good idea what I have to do in preparing for the migration to the new admin interface. Later on the day I had many interesting discussions about varions Django-related things, including ideas about having something like Django release party here in Europe, too. Turns out there are quite a lot Djangonauts here in EuroPython, we just arent organized very well so most of us don’t know about each other. Lively after-conference discussions about career choises, Web Design and working with Django in general were definitely the high point of the conference so far. A couple of hour later on the evening, decisions about quiet evening at the Sky Bar (at the 22nd floor of the conference hotel) were forgotten and, again, we headed for the old town. This time we ended up in some night club and, well, yeah, we had a great time :) -
We Are Django
I’ve always thought that the community is one of the greatest things about Django. Not because Django isn’t great but because the people are just so awesome! Django People is a brilliant new site by Simon Willison and Natalie Downe which brings together Djangonauts all over the world. (Interestingly, I was talking about exactly this same idea yesterday with my friend, in the lines of “there should definitely be something like that”. Great minds think alike (I wish) :) I had the pleasure of meeting Simon and Natalie during the Europython conference last summer. Like every other Django people at the conference, they were super-nice and fun to share thoughts with. The various conversations we had with the Web-gang there were definitely one of the highlights of my last year. I hope that Django People will help in finding more same-minded people, both near you and when traveling around the world. If you are Djangonaut, add yourself to the site! And when you do, please include your picture and some information about yourself. It’s so much nicer to look at real faces than empty rectangles :) Here’s to many more Django friends. -
Django Release Party in Helsinki
Heads up Finnish Djangonauts! Join us for celebrating the Django 1.0 release at Kaapelitehdas, Helsinki tomorrow evening (Saturday 6th) starting at 5 pm. More information on the location and attendees can be found on the event wiki page. This is an open invite — everyone is welcome! See you there! :) -
EuroPython 2008, day 2
I skipped most of the sessions for the day as they didn’t seem even remotely interesting to me. But, the ones I did attend where really good. Last nights partying kept me pretty much in bed for better part of the morning. Descriptor tutorial by Raymond D. Hettinger was very good and I think it was actually the first conference tutorial ever that actually teached me something about programming and Python in general. There was quite a bit testing-related material on the Lightning talks. One thing I wrote down on my notes was the phrase ”Given enough tests, all bugs are shallow” (originally from Linus Torvalds in a form ”Given enough eyeballs, all bugs are shallow”). The keynote talk for the day was something that absolutely blew my mind. Hans Rosling talked about Gapminder and how statstical data and databases should be free. First thing that crossed my mind when listening to him was that ”I wonder if Adrian Holovaty has ever talked to this guy — they’d have much to talk about”. If you havent heard about Gapminder or Hans Rosling before, you should definitely see his talk on last years TED conference. In Django-terms, thats some cool shit … -
The basics of creating a tumblelog with Django
On my new homepage, a combined list of my tweets, bookmarks, and user comments on my site appear underneath my latest blog entries. I use a fun bit of Django code to pull these various items together, sorted by publication date, and I'd like to share how this bit of tumblelog-like functionality works. -
Django SXSW Lunch Meetup
Hey all you Djabgo devs roaming the halls of SXSW: let's do lunch... -
Introducing Django JumpToAdmin
Django JumpToAdmin displays links to admin change/delete/list pages when specified objects on a page are hovered over with the mouse. Once clicked, these links open the requested Django admin page in an iframe above the current page. Read on to see a screencast of the UI. -
The basics of creating a tumblelog with Django (part 2)
Since posting "The basics of creating a tumblelog with Django," I've received some requests to explain how to get these tumblelog items to actually show up on my homepage. -
Django development on OS X using a local media server
Host static media from outside of Django while developing locally. For some, this solution will be rather obvious. For anyone else, I hope this helps your workflow like it helped mine. -
Django back on Dreamhost?
An email I received from Dreamhost indicated official support for running Django. After email correspondence with Dreamhost support, it's clear that Django is still not officially supported, but it should run better than it did before they made some recent changes. -
Introducing CSS Prism, a CSS color inspector
After launching a new site at work in which colors from a previous site weren't replaced in the stylesheet, I decided to find a way to reveal all the colors used in any .css file. When I couldn't find a way, I made one. So today I'm launching CSS Prism, a CSS color spectrum inspector -
Design decisions and highlights of Scripps' newest local news site
Earlier this week, the team at Scripps Interactive Newspaper Group launched a major newspaper website overhaul for the Evansville Courier & Press in Evansville, IN. This project has been brewing for almost a year, and has been a full-time responsibility for some of us for more than six months. Here are some of my favorite changes for readers -
Finding a Django-friendly host just got a little easier
Djangofriendly celebrated its first birthday in March. In its first year, more than 16,000 visitors came by to find and share knowledge on hosting Django applications with various hosts. To celebrate Djangofriendly's birthday, I've gone into a bit of a code sprint, the first phase of which concluded this morning as the new code went live... -
Hosting Subversion on Webfaction
Recent projects at work have finally led me to incorporate Subversion into my Django development workflow. Once I saw the light, I wanted to manage my personal and client projects with the same efficiency, but hesitated to sign up for SVN hosting services on my own dime. Turns out I could add SVN hosting to my existing WebFaction account. Here's how. -
Working with the Django admin and legacy databases, pt.3
Working with the Django admin and legacy databases, pt.3 -
Image resizing on file uploads. Doing it the easy way.
Image resizing on file uploads. Doing it the easy way. -
Working with the Django admin and legacy databases, pt.1
Working with the Django admin and legacy databases, pt.1 -
Working with the Django admin and legacy databases, pt.2
Working with the Django admin and legacy databases, pt.2 -
Posting to the Twitter API on an admin change
Posting to the Twitter API on an admin change -
nabuco - Nomadblue Blog - First post
A whole weekend doing some fun coding has produced this brand new kid on the blogosphere. Soon I will write my first "real" post, in the meantime I can't wait to leave the URL to django-nomadblog, the django app that I built to run this weblog: http://bitbucket.org/nabucosound/django-nomadblog You will need Mercurial to clone it out. Hasta pronto! -
nabuco - Nomadblue Blog - django-nomadblog
Updated 13 Sep 2009: The current project page for django-nomadblog can be found here Here it is, the initial documentation for my first django app release, django-nomadblog. Overview This is a basic Django application implementing the most simplest form of a blog (from my point of view, of course). It has been written with an eye on keeping modularity as far as possible, so you won't find lots of goodies in the code, but just a couple of features to help you start hacking. Features A mechanism to tell the application if there's gonna be only one blog or multiple blogs and users, easily configurable via a project setting and a URL pattern. Views are split into two functions, one for the view logic and the other in charge of creating or updating the RequestContext. This enables calling the logic behind a view without rendering the response. It is better explained below. Installation Soon I'll package the whole thing and upload it to PyPi for the sake of standard installations. Mercurial checkout Install Mercurial if you don't have it yet, and clone the repository: hg clone http://bitbucket.org/nabucosound/django-nomadblog/ Symlink to the folder called nomadblog inside django-nomadblog from somewhere in your PYTHONPATH … -
nabuco - Nomadblue Blog - Context in django views, DRY, reusable apps
DRY (Don't repeat yourself) is always a good coding practice I try to follow, at least whenever deadlines allow me to do so. Even for a bunch of code bits, it helps keeping clean and modular. Talking about views, I find myself using different techniques and approaches to write a single function that centralizes all the logic and, at the same time, behave differently, depending on who is calling it. Sometimes it is good to overload the number of arguments it receives, and use them as indicators and flags to switch to the desired behavior. A simple example, widely used in lots of Django apps and projects, is to pass a template variable from the kwargs positional argument in a URLconf: url( regex=r'^$', view='list_posts', name='list_posts', kwargs={'template': 'yourtemplatepath/templates/yourtemplate.html'}, ) In your view, you receive the parameter and render either the template value passed with the 'template' parameter, or the default template otherwise: def your_view(request, template='templates/default.html'): ... return render_to_response(template, {}, context_instance=RequestContext(request)) If you want to add functionality to certain cases, instead of modifying the base view, you better create a wrapper function, which will be called before, adding all the stuff you need to execute before or after. For instance, another trivial … -
django CMS 2.1 final was just released!
django CMS 2.1 final was just released! -
nabuco - Nomadblue Blog - Tweaking URLconf (2 named URLs, 1 view)
Introduction Update: I realized I didn't fully explained the whole picture of the issue I am describing here, so I have added a few lines more in the introduction section. In a project with an application named concerts that lists concerts from european cities, consider a classic two-level URLconf where the root urls.py module "includes" (i.e. uses the include method from django.conf.urls.defaults) a second URLconf module. urls.py from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^concerts/', include('concerts.urls')) ) concerts/urls.py from django.conf.urls.defaults import * urlpatterns = patterns('concerts.views', url(regex=r'^list/$', view='my_view', name='concerts_list_all') ) Let's say you want to extend the URLconf and have two kinds of URL to call the same view, the first to display all concerts, the second for concerts in a given city: /concerts/list/ /barcelona/concerts/list/ /london/concerts/list/ /paris/concerts/list/ There are two situations we want to overcome in this scenario. First, only one view must be used, so a little bit of business logic must be implemented. The function behaves differently if it receives the location keyword argument or not: concerts/views.py def my_view(request, location=None): if location is not None: # filter concerts QuerySet by location, for example else: # query all concerts return render_to_response('base.html', {'location': location}, context_instance=RequestContext(request)) The second one is the one …