Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
A new litmus test for evaluating Python web frameworks — What’s your security policy?
With the almost daily announcement of new Python-based web frameworks, there needs to be a way to filter the contenders from the pretenders. I’ve been mulling over the idea of compiling a checklist for evaluating new frameworks. The checklist could also be used by new would-be Python framework creators as a gut check for the [...] -
Django is the favourite of Guido van Rossum
Guido van Rossum said in the latest FLOSS Weekly podcast: My personal favorite -- and I expect that that will remain a personal favorite for a long time -- is something named Django. ... I highly recommend it. Django has been my tool for a new project of mine, has been worth it the time spent learning Django and Python(right now my personal favourite programming language). Django preferred setup is Apache with mod_python, this has make my choice easier because I've been always using Apache with PHP. If you want to give it a try(I recommend it), read the Part 1 of the tutorial. And if you have doubts about performance, read this. -
Django is the favourite of Guido van Rossum
Guido van Rossum said in the latest FLOSS Weekly podcast: My personal favorite -- and I expect that that will remain a personal favorite for a long time -- is something named Django. ... I highly recommend it. Django has been my tool for a new project of mine, has been worth it the time spent learning Django and Python(right now my personal favourite programming language). Django preferred setup is Apache with mod_python, this has make my choice easier because I've been always using Apache with PHP. If you want to give it a try(I recommend it), read the Part 1 of the tutorial. And if you have doubts about performance, read this. -
Second skinning
Yes, this week we are moving! Second-skinning the Melt site, and you can see it happen. After quite a few discussions and deliberations about name, logo, colours, what not, we're now at my preferred stage: doing it. Right now, I am at the office of Eight Media in Arnhem, where Simon is working live at the Melt staging site to implement the design. You will notice the name under which this all will go live: CoolThePlanet.net. Lots of little design decisions and checking it out with BrowserCam on different platforms, while hacking away at the Django templates, hopefully taking the opportunity to internationalise the static interface texts in there, and be ready for localisation in other languages. But first, counting down the days now to the opening of CoolThePlanet.net! -
Second skinning
Yes, this week we are moving! Second-skinning the Melt site, and you can see it happen. After quite a few discussions and deliberations about name, logo, colours, what not, we're now at my preferred stage: doing it. Right now, I am at the office of Eight Media in Arnhem, where Simon is working live at the Melt staging site to implement the design. You will notice the name under which this all will go live: CoolThePlanet.net. Lots of little design decisions and checking it out with BrowserCam on different platforms, while hacking away at the Django templates, hopefully taking the opportunity to internationalise the static interface texts in there, and be ready for localisation in other languages. But first, counting down the days now to the opening of CoolThePlanet.net! -
Django .95 Is Here!
Yes, Django .95 has just been released. For those who don't run off SVN trunk, there will be some upgrade issues. Read Removing The Magic on the Django wiki carefully. The changes to Django are well worth any upgrade inconvenience. And some things are just plain easier to get done post magic removal, as I found out this week back-porting a Google site map generator app I wrote while running from SVN.Congratulations to Adrian, Jacob, and all who contribute code for the release! -
Post-OSCONum part 1: try not to suck
Post-OSCONum part 1: try not to suck Good lord, I’m exhausted. OSCON was amazing. It’s clear that a sea change is occurring in the open source movement: to paraphrase Tim O’Reilly’s keynote, we’re finally moving away from “free software is better because it’s free” towards “free software is better because it’s better". This of course makes being a free software author more exciting than ever. Judging by the number of job postings, it’s also easier than ever to actually get paid for work on open source. -
Acknowledging the Mobile Web with Django
I was reading up on HowToProvideAlternateViewsForMobileDevices on the Rails wiki this morning and couldn’t help but notice how much easier it is to set up a mobile version of a Django site. At World Online we have stripped-down barebones no frills “all we want are the facts ma’am” versions of all of our sites. They prove extremely useful during KU basketball games or when you’re in downtown lawrence and want to know what restaurants are open. Since our mobile sites are just alternate templates on the same views, setup goes something like this: In main_site.settings: TEMPLATE_DIRS = ( '/path/to/templates/mainsite.com/', '/path/to/templates/default/', ) In mobile_site.settings: from main_site.settings import * TEMPLATE_DIRS = ( '/path/to/templates/mobile.mainsite.com/', '/path/to/templates/default/' ) The first line imports all of the settings from your main site. We then overwrite the TEMPLATE_DIRS setting to point to the mobile version of our templates (and fall back to default templates if there isn’t a mobile specific version). Because every app that we write also gets a default template we can have a complete mobile site up and running by creating just one or two mobile base templates. While Django can’t help you debate internally the “one web” versus “two webs” philosophies, it can definitely … -
Getting up to speed for developers
As we're moving along, I'm starting to collect stuff that can help people get started with Django. An interesting list of links on the blixtra blog: Top 30 Django Tutorials and Articles, complementing the overview of documentation on the Django site. In the meantime, our colleagues at hosting have provided us a virtual machine to configure as the host for our platform. We are thinking about making such a virtual machine available to developers as well. It would make live so much easier: download the image, run it, and you're ready to help in developing our platform. No other downloads or setups needed, eveything including the automated testing ready for you to use. Also, the data sets for our geo-location data are being merged. We have some 108,000 places in there, and about to add another 150,000 or so for the US, with a third collection still waiting. Getting everything together (longitude, lattitude, duplicate names, missing links to country or region, different spellings or transcriptions, there is some work involved before we get things on a map). Another interesting week ahead. -
Getting up to speed for developers
As we're moving along, I'm starting to collect stuff that can help people get started with Django. An interesting list of links on the blixtra blog: Top 30 Django Tutorials and Articles, complementing the overview of documentation on the Django site. In the meantime, our colleagues at hosting have provided us a virtual machine to configure as the host for our platform. We are thinking about making such a virtual machine available to developers as well. It would make live so much easier: download the image, run it, and you're ready to help in developing our platform. No other downloads or setups needed, eveything including the automated testing ready for you to use. Also, the data sets for our geo-location data are being merged. We have some 108,000 places in there, and about to add another 150,000 or so for the US, with a third collection still waiting. Getting everything together (longitude, lattitude, duplicate names, missing links to country or region, different spellings or transcriptions, there is some work involved before we get things on a map). Another interesting week ahead. -
"Show-stoppers"
Lately a large number of questions posted to django-users have included phrases like “this is a show-stopper” or “this is critical”. I think it’s worth my time to point out that this is a lousy method of getting developers to do what you want. It’s the online equivalent of threatening to take your ball and go home, and is about as effective. I understand the impulse perfectly: there’s the fear that we won’t take you seriously if you don’t tell us just how important this is. -
Digg dugg
My last entry about my dog eating my DSlite hit Digg (screenshot), Reddit (screenshot), and a couple of other big-traffic sites over the weekend. Pretty cool, but the coolest part is that my server — a single commodity Linux box that cost less than $3,000, running about 15 other sites — didn’t even hiccup. Reason #4453 to use Django? It’s fast. Crazy fast. Oh, and to all the Diggers who suggested that I should kill my dog? -
Back online and moving ahead
Last Friday we had a problem with our development server, and so our Melt instances were unavailable for a while. Yesterday, a disk change in that server caused some more downtime, but things are back up again. In the meantime, it has been a bit quiet here on the blog, while work was progressing. The naming and design are moving forward, and we should have final versions and be implementing the design in our templates soon. And... we now have the Melt project space at Sourceforge (thanks for your help, Misha!), so our software will become available through the new Sourceforge Subversion system. -
Back online and moving ahead
Last Friday we had a problem with our development server, and so our Melt instances were unavailable for a while. Yesterday, a disk change in that server caused some more downtime, but things are back up again. In the meantime, it has been a bit quiet here on the blog, while work was progressing. The naming and design are moving forward, and we should have final versions and be implementing the design in our templates soon. And... we now have the Melt project space at Sourceforge (thanks for your help, Misha!), so our software will become available through the new Sourceforge Subversion system. -
Sending E-Mails via Templates
So you've got an application written in Django that needs to send large bodies of e-mail, but you don't want the e-mail message itself to be in your Python code. Fair enough, I'd say - you should be separating form from function, and in this case, the e-mail output is still what I'd classify as 'form'. One way to tackle this situation is to create a template for your e-mail body, process that template to fill in the gaps (eg Username, URL's, etc) and shoot it off via Django's e-mail functions instead of rendering it in a web browser as you'd normally do with templates. First things first - create your template. In this case I'm writing an e-mail to a user thanking them for registering on a website. I've put the template in my templates directory, called email.txt in the registration subdirectory. Dear {{ name }}, Thank you for signing up with {{ product_name }}. Your new username is {{ username }}, and you can login at {{ login_url }}. Once logged in, you'll be able to access more features on our website.. We hope that {{ product_name }} is of good use to you. If you have any … -
Sending E-Mails via Templates
So you've got an application written in Django that needs to send large bodies of e-mail, but you don't want the e-mail message itself to be in your Python code. Fair enough, I'd say - you should be separating form from function, and in this case, the e-mail output is still … -
Bad dog!
So I came home to find this: [A moment of silence for my so-recently-new toy…] He mangled the thing pretty good, but amazingly it still turns on, albeit with a busted touch-screen. However, Nintendo’s customer service provides a happy(ish) ending to this story. Here’s a rough version of my call to Nintendo: Nintendo: Nintendo of America! This is —-, how may I help you? Me: -
Cyclomatic complexity of Django
Adrian’s recent post on the dev mailing list about the code within django.db.models got me remembering some other “monstrous” functions I’ve seen while browsing the Django source. Guess no more as to the most monstrous functions of Django because below are the results of my previously posted complexity.py script when run on the Django source. [...] -
See Spot Test Django
Here is some “science fiction” I’m working on at the moment for testing the Django admin app with Selenium. I call it science fiction because the I’m still working on the code that will actually read this and execute it correctly in the browser. I imagine the source document will be HTML with a scent [...] -
Django/AJAX Beating
James Bennett is taking a bit of a beating for his Django/AJAXsuggestions. A lot of the criticism is unmerited Rails envy, I imagine. Rails has RJS — great! Django is not Rails.If you want to build more than toy apps, you'll need something more sophisticated than these little server-side helper functions. And if you just want partial page updates or DHTML UI tricks, any JavaScript toolkit can make this quick and painless for you.I also don't see why when someone says "Django's AJAX support shouldn't look like RJS," people hear, "Django isn't going to include AJAX support." AJAX, for all it's usefulness as a term, is used in many different ways. I think the confusion in this case is due to the same word being used to mean two completely different things. -
New Job with Naples Daily News
I've taken a new job with Naples Daily News. I'll be a developer in the new media department building cool stuff with Django. I'm excited about the work and about working with Rob Curley, Eric Moritz, and the rest of the team.I'll still be Alabama working from home, being that I just bought a house 3 months ago. I'll travel a bit more now, making monthly trips to Naples, which is a really beautiful and interesting city.I think this is one of the best moves I've ever made. When I first started working with Django, I was so impressed by what I heard about World Online and really wanted to be doing the same kind of work and be in the same kind of environment. Now, I get that chance. How cool is this!I finish at the library on Tuesday, July 11, and start work with Naples News the next day. -
Now Django Powered
I finally got this site converted to Django, more or less. There are a few static pages lying around, but on the whole, I'm Django powered now. It was quite a hack job, of which I'll (maybe) relate later.My hosting service Jump Domain doesn't really advertise Python or Django support. It can be done, though it's probably not for the faint of heart. Scott with Jump Domain has been ultra helpful and I'll try to talk with him more about what can be done to improve support for Django and Python. -
Improved text image view
I just found this in my django-ego-feed: 23 excuses: Simple Django View for Dynamic Text Replacement I’ve been using something similar to generate the titles for the site (look at the title above for an example), so I’m pretty familiar with the technique. Andrew’s code over there is pretty good, but I’ve got a few improvements he and you might be interested in: The business to writing to a temp file is ugly and will break as soon as you get two simultaneous requests. -
Django OSCON shirts
I’m about to print up some Django shirts to take to OSCON next month – got any ideas? We gotta move pretty fast (we’re going to try to get an order in to the printer this week) so if you’ve got any hot ideas (or designs, for that matter) send ‘em to me! I’ll mail anyone who gives an idea or a design one of the final shirts, but otherwise please don’t ask about “ordering” or otherwise “getting” one. -
Using Django's TemplateTags
I've had a number of e-mails about how I include the listing of blog tags and archives by month on the side of my website from people who have obviously built up a blog and now want further integration with their website. Well, it's ultra-simple thanks to a nifty Django feature called template tags. The concept behind template tags is simple - a quick snippet of code in your page templates calls some python code behind the scenes, which does some stuff, and returns either raw HTML code (yuck) or sets new variables in your template context, allowing you to manipulate and display them as you please (cool!) To get started, in the application directory for your blog, create a directory named templatetags and place an empty file in it, named init.py. Now, create a file - in this case we'll call it blog_months.py. We need to do a few things in this file: Import the relevant models so we can access the data Create and register new template tag Write the function(s) for that tag so they add data to the template's context. The contents of this file need to be: from yourproject.blog.models import Tag,Post from django.template import Library,Node …