Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Serving multiple templates
-
Django 1.1
Django 1.1 is nearing a release and from what I can see about the new features the two most exciting one (to me at least) are improvements from the models end that is the "managed" model and the "proxy" models. Managed models would be good for existing tables that should not be managed by django. This is useful in some of my projects in which I am using django for database work but do not necessarily need django to manage it. Now if only the database evolve stuff or database versioning stuff: http://paltman.com/2008/jul/03/managing-database-changes-in-django/ could be integrated into the core, now that would be superb!Talking about migration too, is this project: http://code.google.com/p/dmigrate/ still alive. Doesn't look like there are any downloadable stuff. The examples are half of what I need what I further need is the ability to undo db migration changes between revisions. -
django-renderformplain
django-renderformplain is a Django app that allows you to render forms in plain text. I have found myself implementing quite a bit of styling into my forms and thought why do it once more when I want to render just the data. Renderformplain works both with bound forms (renders bound data) and unbound forms (renders [...] -
The lack of magic in Django
...or why Rails and Zope 2 were too magical. -
Summer Spam
Spam is occupying more than its customary share of my attention in recent weeks. I've long had a morbid fascination with sleazy human communication (hence Purportal.com). That makes the always-relentless stream of spam, though not exactly welcome, at least interesting. Spam volume also seems to have increased during this period. The number of spam attempts my mail server rejects per day had been steady at around 3,000 for months. Now it's back up around 5,000 or 6,000. I run my own mail server and fight spam via greylisting, blacklisting, and other strict technical rules. This setup rejects 99+% of the spam aimed at the domains I host, but some still gets through to me. Never enough to displace real mail, but enough to keep my little hobby-interest alive. Here are some of the spam highlights of my summer so far: After one too many identical HTML spams, I took the rare step of adding a custom rule to my mail server config. I started rejecting all mail with "Content-Type: text/html; charset=us-ascii". In this age of Unicode, that's turned out to be a pretty safe bet. Lots of rejections and no known false positives. I received a weird email about money … -
Django 1.1 Release Candidate ya está aquí
Se ha anunciado la disponibilidad de Django 1.1 Release Candidate en el weblog oficial de Django. Django 1.1 RC no está pensado para uso en producción pero es un paso más hacia la versión final de Django 1.1: Incluye casi todas las mejoras que estarán presentes en la versión final. Se puede descargar directamente desde aquí. La versión final de Django 1.1 se espera para la semana que viene. -
Anúncio oficial da PythonBrasil[5]
Anúncio oficial da PythonBrasil[5] -
Anúncio oficial da PythonBrasil[5]
Anúncio oficial da PythonBrasil[5] -
Django Forms Quick Reference
Django's forms have fields like models, but you access them in a completely different way. I've found it hard to remember the correct way to access form field data properly, so this is a summary of the things I need to do with forms and how to do them. In particular these are useful in the form's __init__ method after calling super() to set up the form the way you want to. -
Forms, forms, forms
Some questions answered about Django forms. -
oEmbed y Django: incrusta contenidos de servicios web con django-oembed
oEmbed es un formato que permite usar una representación embebida de una URL en sitios web de terceros. La API de oEmbed permite a un sitio web incrustar contenido (como fotos o vídeos) de otros servicios web simplemente con un enlace al recurso que quiere se publicar. De esta forma se evita tener que utilizar una API distinta para incrustar contenidos de cada servicio web. Varios sitios como Flickr, Viddler, Qik, Hulu o Vimeo permiten acceder a sus contenidos mediante oEmbed. Además el sitio web oohEmbed sirve como wrapper para acceder a contenidos de otros sitios como YouTube, Wikipedia ó Wordpress.com entre otros ... -
Improved Django FormWizard
A few months back I had a project that I thought needed a wizard-style interface for one of its forms. For a while now Django has included the FormWizard class in django.contrib.formtools.wizard so I decided to use that. However, I immediately hit a couple of issues with it.FormWizard requires you to output the previous_fields context variable in each of the form's step templates. Django's -
ETag magic with Django
An ETag is a feature of HTTP that allows for a web server to know if content has changed since the last time the browser visited the page. The client sends the ETag from the cached page in a header. If the ETag in the header matches the current ETag then the server lets the browser know that the cached is up-to-date by sending back a 304 Not Modified response. -
ETag magic with Django
An ETag is a feature of HTTP that allows for a web server to know if content has changed since the last time the browser visited the page. The client sends the ETag from the cached page in a header. If the ETag in the header matches the current ETag then the server lets the browser know that the cached is up-to-date by sending back a 304 Not Modified response. The most natural way to build an ETag is to generate it from the HTML returned by the view, which I believe is how the default view caching works in Django. The downside of this is that the page is generated even if the client has a cached copy, and all that is saved is the cost of sending the page to the client. Bigger wins can be had by using Django's conditional view processing to calculate an ETag outside of the view. I haven't seen the requirements documented, but as far as I can tell there is only a single property needed in an ETag: The ETag should vary with the page, i.e. when the page content changes, the ETag chages. A simple alternative to generating an ETag from … -
ETag magic with Django
An ETag is a feature of HTTP that allows for a web server to know if content has changed since the last time the browser visited the page. The client sends the ETag from the cached page in a header. If the ETag in the header matches the current ETag then the server lets the browser know that the cached is up-to-date by sending back a 304 Not Modified response. The most natural way to build an ETag is to generate it from the HTML returned by the view, which I believe is how the default view caching works in Django. The downside of this is that the page is generated even if the client has a cached copy, and all that is saved is the cost of sending the page to the client. Bigger wins can be had by using Django's conditional view processing to calculate an ETag outside of the view. I haven't seen the requirements documented, but as far as I can tell there is only a single property needed in an ETag: The ETag should vary with the page, i.e. when the page content changes, the ETag chages. A simple alternative to generating an ETag from … -
Django Training
I’m pleased to announce that I’ll be teaching a week-long introductory Django course in Kansas City, September 21st - 25th. Teaching’s folks how to use Django is one of my favorite things to do – in fact, I’m in San Jose right now gearing up for a tutorial at OSCON tomorrow – so it seemed a natural thing to make it an aspect of my business. So, if you need to learn Django, why not come spend a week in Kansas City with me? -
Efficiently Test Emails in Django
Testing emails can be an inefficient process. The email needs to leave your machine, arrive at the SMTP server, get forwarded to your test mail server and then downloaded by your email client. Do you want those 30 seconds of your life back? Using an SMTP sink, you can receive the email to your screen instantly. Setup is easy. ♦ Download smtp_sink.py ♦ Put it in whatever your project directory is. You will want to create a "inbox" directory. Besides outputting to the screen, this will automatically copy the email to the inbox directory in case you need to reference it later ♦ Change your settings.py to have: EMAIL_HOST = '127.0.0.1', EMAIL_HOST_USER = '', EMAIL_PORT = 25 If you have a script that loads your sandbox environment automatically, you will want to load smtp_sink.py automatically. It will send a test signal to see if it's already running and not start twice. If you run automated test scripts, the output of the "inbox" can be tested. -
Templatetag {% if %} con más comparaciones
Este snippet reemplaza la funcionalidad del templatetag {% if %} permitiendo realizar comparaciones con operadores >, <, >=, <=, != además de las comparaciones que permite hacer {% if %} por defecto ... -
Django, Push Notifications, and Prowl
One issue that I have had with this blog for a while has been the lack of notifications when a new, legitimate comment is posted under one of my articles. I don’t get many comments, but when I do, I would like to be able to respond right away. I don’t like email notifications, so when Prowl was announced this week, I was excited about the possibility of sending push notifications to my iPhone whenever a new comment was posted. It turned out to be much easier than I anticipated, thanks to Jacob Burch’s Prowlpy module and Django’s signals framework. To setup push notifications for anything, you need to get these done first: Register for an account at the Prowl site, then go to iTunes Store and buy Prowl for your iPhone/iPod Touch After setting up your device, login to your account at the Prowl web site, click on Settings, and generate an API key Download and install Prowlpy and httplib2. I opted for simply putting Prowlpy somewhere on my PYTHONPATH, and installing httplib2 through aptitude: sudo apt-get install python-httplib2 Now that you are ready, simply create a signals.py file under whichever Django application you would like to use to … -
Django Training
I'm pleased to announce that this September, Revolution Systems will be offering a four-day Django training course here in Kansas City, taught by Jacob Kaplan-Moss. Jacob has taught a number of similar courses privately in the past, but this is the first time we're opening this up to the public. If you've been wanting to really learn Django, this is a great chance. The class is intended for relative beginners to Django, but by the time you leave you'll know enough to create some pretty awesome websites. The class will be Monday, September 21 - Friday, September 25, 2009 in Kansas City, MO. For more, or to sign up, check out the full details. -
Pyrohose Logo Design
I spent last weekend finishing up a logo for a super secret project I can't go into yet at the client's request. I can share the logo in the meantime. When the client gives me the green-light I'll come back and update the post with a link to the project. -
Python Job Alert
My employer is looking for a new Python developer to work here in Oxford, UK. The company I work for runs 2degreesnetwork.com, which is collaboration service for sustainable business. Basically, it's a social networking type of site for businesses to collaborate on climate change and related issues. I'm not officially allowed to say this, but the closest analogy is ‘Facebook for Businesses’. This is the office. Ignore the man in the far corner, he is just a hobo that wandered in. The site is built with Django, so obviously Django experience would be a bonus, but experience with any MVC framework would be valuable. We're looking for someone who isn't necessarily a specialist and who doesn't mind getting to grips with new technology and dabbling in the front-end from time to time. You will be working in a very relaxed working environment with a diverse bunch of characters. The full job description is below, but all you really need to know is that you will be working with yours truly! If you are interested, Email your CV to james DOT tarin AT 2degreesnetwork DOT com. Would you like to do something genuinely useful with your Software Development skills (Python/Django)? 2degrees … -
Python Job Alert
My employer is looking for a new Python developer to work here in Oxford, UK. The company I work for runs 2degreesnetwork.com, which is collaboration service for sustainable business. Basically, it's a social networking type of site for businesses to collaborate on climate change and related issues. I'm not officially allowed to say this, but the closest analogy is ‘Facebook for Businesses’. This is the office. Ignore the man in the far corner, he is just a hobo that wandered in. The site is built with Django, so obviously Django experience would be a bonus, but experience with any MVC framework would be valuable. We're looking for someone who isn't necessarily a specialist and who doesn't mind getting to grips with new technology and dabbling in the front-end from time to time. You will be working in a very relaxed working environment with a diverse bunch of characters. The full job description is below, but all you really need to know is that you will be working with yours truly! If you are interested, Email your CV to james DOT tarin AT 2degreesnetwork DOT com. Would you like to do something genuinely useful with your Software Development skills (Python/Django)? 2degrees … -
Python Job Alert
My employer is looking for a new Python developer to work here in Oxford, UK. The company I work for runs 2degreesnetwork.com, which is collaboration service for sustainable business. Basically, it's a social networking type of site for businesses to collaborate on climate change and related issues. I'm not officially allowed to say this, but the closest analogy is ‘Facebook for Businesses’. This is the office. Ignore the man in the far corner, he is just a hobo that wandered in. The site is built with Django, so obviously Django experience would be a bonus, but experience with any MVC framework would be valuable. We're looking for someone who isn't necessarily a specialist and who doesn't mind getting to grips with new technology and dabbling in the front-end from time to time. You will be working in a very relaxed working environment with a diverse bunch of characters. The full job description is below, but all you really need to know is that you will be working with yours truly! If you are interested, Email your CV to james DOT tarin AT 2degreesnetwork DOT com. Would you like to do something genuinely useful with your Software Development skills (Python/Django)? 2degrees … -
DjangoCon 2009, Portland OR
DjangoCon 2009 has been officially announced! It will be in Portland, Oregon, my new hometown. I will be planning some after-parties at restaurants, local breweries and the like.