Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
More buildout notes
I got a lot of great feedback on my buildout tutorial I posted last week. In general, the comments there have some excellent tips, tricks, and extra pointer, so check ‘em out. After reading the comments and a few more I got over email, I thought I’d share a selected grab-bag of updates, hints, and details for those fooling around with Buildout and Django. Django trove identifier James Bennett pointed out that Django has its very own PyPI classification, Framework :: Django. -
Nashvegas Issues
GitHub has added integrated issue tracking: So, in an effort to sample this awesomeness, I have converted my TODO file to issues for Nashvegas. Please vote on the ones you care about and enter new ones that would be helpful for you. -
Nashvegas Issues
GitHub has added integrated issue tracking: So, in an effort to sample this awesomeness, I have converted my TODO file to issues for Nashvegas. Please vote on the ones you care about and enter new ones that would be helpful for you. -
Installing GeoDjango with PostgreSQL and zc.buildout
The installation of the PostgreSQL requirements is somewhat daunting. I've spent a bit of time putting together a buildout.cfg to try to make this easier. -
Installing GeoDjango with PostgreSQL and zc.buildout
I've been wanting to play with GeoDjango for a while, since my database of choice (PostgreSQL) has excellent spatial support. However, getting all the dependencies up and running is pretty complicated. I've been working on a buildout to get at least most of the steps done for you. There are a couple of manual steps at the end, which I hope to automate when I next have time to work on this. The buildout installs the following items: PostgreSQL PostGIS GDAL Proj GEOS psycopg2 Django It should also perform initial setup of the PostGIS database template, loading some sample SQL files, and sets up some convenience symlinks for the PostgreSQL command-line programs. It's not finished - in particular, it just assumes that the user running the buildout is to be used as the database owner and such like. Anyway, here it is: [buildout]parts = postgresql postgis gdal init-pgsql pgsql-symlinks django eggs = psycopg2[postgresql]recipe = zc.recipe.cmmiurl = http://wwwmaster.postgresql.org/redir/198/h/source/v8.3.7/postgresql-8.3.7.tar.gzextra_options = --with-readline --enable-thread-safety [postgis]recipe = hexagonit.recipe.cmmiurl = http://postgis.refractions.net/download/postgis-1.3.5.tar.gzconfigure-options = --with-pgsql=${postgresql:location}/bin/pg_config --with-geos=${geos:location}/bin/geos-config --with-proj=${proj:location}[proj]recipe = zc.recipe.cmmiurl = http://download.osgeo.org/proj/proj-4.6.1.tar.gz[geos]recipe = zc.recipe.cmmiurl = http://download.osgeo.org/geos/geos-3.0.3.tar.bz2[gdal]recipe = zc.recipe.cmmiurl = http://download.osgeo.org/gdal/gdal-1.6.0.tar.gzextra_options = --with-python --with-geos=${geos:location}/bin/geos-config[init-pgsql]recipe = iw.recipe.cmdon_install = trueon_update = falsecmds = ${postgresql:location}/bin/initdb -D ${postgresql:location}/var/data -E UNICODE ${postgresql:location}/bin/pg_ctl -D ${postgresql:location}/var/data … -
Installing GeoDjango with PostgreSQL and zc.buildout
I've been wanting to play with GeoDjango for a while, since my database of choice (PostgreSQL) has excellent spatial support. However, getting all the dependencies up and running is pretty complicated. I've been working on a buildout to get at least most of the steps done for you. There are a couple of manual steps at the end, which I hope to automate when I next have time to work on this. The buildout installs the following items: PostgreSQL PostGIS GDAL Proj GEOS psycopg2 Django It should also perform initial setup of the PostGIS database template, loading some sample SQL files, and sets up some convenience symlinks for the PostgreSQL command-line programs. It's not finished - in particular, it just assumes that the user running the buildout is to be used as the database owner and such like. Anyway, here it is: [buildout]parts = postgresql postgis gdal init-pgsql pgsql-symlinks django eggs = psycopg2[postgresql]recipe = zc.recipe.cmmiurl = http://wwwmaster.postgresql.org/redir/198/h/source/v8.3.7/postgresql-8.3.7.tar.gzextra_options = --with-readline --enable-thread-safety [postgis]recipe = hexagonit.recipe.cmmiurl = http://postgis.refractions.net/download/postgis-1.3.5.tar.gzconfigure-options = --with-pgsql=${postgresql:location}/bin/pg_config --with-geos=${geos:location}/bin/geos-config --with-proj=${proj:location}[proj]recipe = zc.recipe.cmmiurl = http://download.osgeo.org/proj/proj-4.6.1.tar.gz[geos]recipe = zc.recipe.cmmiurl = http://download.osgeo.org/geos/geos-3.0.3.tar.bz2[gdal]recipe = zc.recipe.cmmiurl = http://download.osgeo.org/gdal/gdal-1.6.0.tar.gzextra_options = --with-python --with-geos=${geos:location}/bin/geos-config[init-pgsql]recipe = iw.recipe.cmdon_install = trueon_update = falsecmds = ${postgresql:location}/bin/initdb -D ${postgresql:location}/var/data -E UNICODE ${postgresql:location}/bin/pg_ctl -D ${postgresql:location}/var/data … -
Installing GeoDjango with PostgreSQL and zc.buildout
I've been wanting to play with GeoDjango for a while, since my database of choice (PostgreSQL) has excellent spatial support. However, getting all the dependencies up and running is pretty complicated. I've been working on a buildout to get at least most of the steps done for you. There are a couple of manual steps at the end, which I hope to automate when I next have time to work on this. The buildout installs the following items: PostgreSQL PostGIS GDAL Proj GEOS psycopg2 Django It should also perform initial setup of the PostGIS database template, loading some sample SQL files, and sets up some convenience symlinks for the PostgreSQL command-line programs. It's not finished - in particular, it just assumes that the user running the buildout is to be used as the database owner and such like. Anyway, here it is: [buildout]parts = postgresql postgis gdal init-pgsql pgsql-symlinks django eggs = psycopg2[postgresql]recipe = zc.recipe.cmmiurl = http://wwwmaster.postgresql.org/redir/198/h/source/v8.3.7/postgresql-8.3.7.tar.gzextra_options = --with-readline --enable-thread-safety [postgis]recipe = hexagonit.recipe.cmmiurl = http://postgis.refractions.net/download/postgis-1.3.5.tar.gzconfigure-options = --with-pgsql=${postgresql:location}/bin/pg_config --with-geos=${geos:location}/bin/geos-config --with-proj=${proj:location}[proj]recipe = zc.recipe.cmmiurl = http://download.osgeo.org/proj/proj-4.6.1.tar.gz[geos]recipe = zc.recipe.cmmiurl = http://download.osgeo.org/geos/geos-3.0.3.tar.bz2[gdal]recipe = zc.recipe.cmmiurl = http://download.osgeo.org/gdal/gdal-1.6.0.tar.gzextra_options = --with-python --with-geos=${geos:location}/bin/geos-config[init-pgsql]recipe = iw.recipe.cmdon_install = trueon_update = falsecmds = ${postgresql:location}/bin/initdb -D ${postgresql:location}/var/data -E UNICODE ${postgresql:location}/bin/pg_ctl -D ${postgresql:location}/var/data … -
Ajax Validation Aministrivia
Small administrative note, now that Github has it's own issue tracker users wishing to report issues with django-ajax-validation can now do so on Github, instead of the old Google Code page. Django-filter users can also report issues on its Github page, in place of the former system of "message or email me", which, though functional, wasn't very convenient. -
Developing Django apps with zc.buildout
Developing a Django app with zc.buildout Over the weekend I put together django-shorturls, the latest in a series of small plugable Django apps I’ve written. This time, though, I used zc.buildout and djangorecipe to build, test, package, and distribute the app, and (with the exception of a few annoyances) it’s an exceedingly civilized way to develop an app. In the interest of helping improve Buildout’s still-nascent documentation, I documented my steps along the way. -
How to make the Django 500 (server error) view useful
Django is pretty awesome. It comes with a lot of view functions built-in. One of these functions is the 500 (server error) view. Quoting the Django documentation for the 500 view: Django executes special-case behavior in the case of runtime errors in view code. If a view results in an exception, Django will, by default, call [...] -
Nobody expects Python packaging!
Python has one package distribution system: source files and setup.py install. And easy_install. Python has two package distribution systems: setup.py install and easy_install. And zc.buildout. Python has three package distribution systems: setup.py install, easy_install, and zc.buildout. And pip. Amongst Python’s package distribution are such diverse elements as… -
Sum for the range of a column in Excel
Working on my current project, one requirement came out which made me all the more appreciative of django's nice array of built-in filters. I generated an Excel report for my clients which is generated from html. Good and nice. Then one of them said, hey can the Excel report have a row which outputs the sum of the whole column of say the column E? Something usual and easy in Excel but stumped me for a while of how to do it from html to excel. For the most part it was trying to figure out how to include that SUM formula at my html code. A little visit to M$ support center got me the help I needed and then it was back to nice plethora of filters django has .... Turns out that you can include formula into a cell (or a table column in this case) by simply doing something like this '=SUM(E2:E70)' just after the opening tags for your column. This part actually took the longest for me as I did not really know how to do it correctly. My last row in this case was dynamic because it depended on the number of rows generated … -
Turning off django signals
While I'm on the subject, how to turn off signals that you don't want on. -
The many benefits of pot
Steve Yegge is one of the bloggers I read almost religiously. His posts are full of insights on the software development topics and in general, and he is always ready with an amusing anecdote from his rich life. His last post Have you ever legalized marijuana? didn’t disappoint either. The author explains “Shit’s Easy Syndrome” (a difficult topic even for seasoned bloggers) in a gay romp that takes a reader from a light-hearted review of a book on “bugs in our mental software” to hapless VPs to many technical difficulties of legalizing a psychoactive drug extracted from the plant Cannabis sativa . But the most entertaining and educating part is the incredible story of the author’s life. -
web.py, Dreamhost, and the django templating framework
Getting web.py working properly on Dreamhost was a real pain, especially since the wiki article on the subject was flat out wrong in several places. I ended up choosing to use fcgi for talking to apache, which is good for performance but not optimal for development work (you sometimes have to kill the process and [...] -
Dallas Django 1.1 Sprint
Djangonauts of Dallas rejoice! We are joining forces to have our very first Django Sprint event for the upcoming 1.1 release. For more info: When: Saturday, April 18, 2009 at 9:00am to Sunday, April 19, 2009 at 5:00pm Where: Cohabitat 2517 Thomas Ave. Dallas, TX Facebook Event Page: http://www.facebook.com/event.php?eid=81320026376&ref=nf -
Hooray for standards
Hey, look, it’s a new W3C site. Hm: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Ooh, XHTML… $ curl -sI http://beta.w3.org/ | grep 'Content-Type' Content-Type: text/html; charset=utf-8 Heh. -
Easier Translations with django-rosetta
I just found out about this Django application called django-rosetta that uses the Google AJAX Language API to suggest translations for translatable strings in your project. Even more interesting is the admin-like interface it creates to enter translations directly from a browser - and it doesn’t need any database tables, everything is directly written to translation files. I didn’t try it out yet, but if it works as advertised, it could become one of my default applications. Visit the bookmark » -
Building Better Web Services With Django (Part 1)
Building a RESTful webservice is pretty straight-forward with Django, but in many cases you want to have both a human readable website and a machine readable api. A lot of websites solve this problem by using www.x.com as the human site, an api.x.com as the machine site. They also will typically have different structures to [...] -
Django Site of the Week: The A.V. Club
It's been a while, but the Django Site of the Week is back. This week I spoke to Tom Tobin, developer at satire news site The Onion, about their Django-powered site The A.V. Club. Originally a Drupal website, Tom and his team converted the site to Django over a period odds three months. So how do they handle a million unique views a month? Read the article to find out. -
Django Site of the Week - The A.V. Club
For various reasons I haven't been able to post a Django Site of the Week for quite a while now, which is a little embarrassing. I've had this little interview sitting in my inbox for over a month, and I've only just been able to write it up and get it published. Just about everybody online has come across The Onion at some stage. Whether you have interpreted a satirical news story as the truth, or just read it for a laugh, The Onion is a staple of online publishing. A less-satirical yet still enjoyable feature of The Onion is The A.V. Club. Originally part of the printed Onion newspaper and then a PHP-powered Drupal based website, The A.V. Club is now running on Django - and the team who built it love Django to bits. This week, I spoke to Tom Tobin, web developer at The Onion. We discussed how they built the A.V. Club website, how they manage with a million unique visitors a month, and what their plans are for the future of The Onion's online presence. You can read the interview and leave your comments at the Django Site of the Week Website. -
Django Site of the Week - The A.V. Club
For various reasons I haven't been able to post a Django Site of the Week for quite a while now, which is a little embarrassing. I've had this little interview sitting in my inbox for over a month, and I've only just been able to write it up and get … -
Signal vs overriding save
I'm a big fan of signals and wonder why people are so adverse to using them, preferring overriding save instead. -
Django - autoryzacja przez Clickpass - tutorial
Clickpass umożliwia proste logowanie użytkowników za pomocą kont które już posiadają w innych systemach, np. hotmail, yahoo, google, facebook, aim, clickpass lub OpenID. Zasadę działania opisywałem w poprzednim poście. Teraz pokaże jak zaimplementować to w Django. Korzystam z aplikacji która ostatnio udostępniło washingtontimes, a mianowicie django-clickpass. Jest to aplikacja która bardzo upraszcza wykorzystanie clickpass w django. Instalacja Zainstaluj django-openid: svn co http://django-openid.googlecode.com/svn/trunk/django_openid django_openid Zainstaluj paczkę python OpenID 2.2.1 - http://openidenabled.com/files/python-openid/packages/python-openid-2.2.1.tar.gz. Szczegółowe instrukcje znajdziesz tutaj: http://www.openidenabled.com/python-openid/ Dodaj django_openid do Twoich INSTALLED_APPS. Zainstaluj django-clickpass: svn co http://opensource.washingtontimes.com/projects/public/django-clickpass/trunk/clickpass clickpass Dodaj clickpass do Twoich INSTALLED_APPS. Do głównych urls.py dodaj from clickpass.consumer import ClickPassConsumer Dodaj (r'^openid/(.*)', ClickPassConsumer()), do Twoich urlpatterns w urls.py: Przykład urls.py, do dodaniu ClickPassConsummer: from clickpass.consumer import ClickPassConsumer urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^moja_aplikacja/', include('moj_projekt.moja_aplikacja.urls')), (r'^openid/(.*)', ClickPassConsumer()), ) Dodaj clickpass.consumer.ClickPassConsumer do MIDDLEWARE_CLASSES gdzieś po django.contrib.sessions.middleware.SessionMiddleware, np: Przykład: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'clickpass.consumer.ClickPassConsumer', 'django_openid.consumer.SessionConsumer', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', ) W szablonach możesz dodać przycisk clickpass za pomoca template tag'a clickpass_button_large* lub clickpass_button_small. {% load clickpass %} {% if user.is_anonymous %} Zaloguj się {% clickpass_button_small %} {% else %} Zalogowano jako: {{user.first_name}} {{user.last_name}} {% endif %} Możesz także napisać kilka domyślnych szablonów które używa django-openid. Szablony są w katalogu: django_openid/templates/django_openid Konfiguracja konta clickpass Załóż tzw. … -
Django/Dojo Stammtisch in Berlin
For the second time Django enthusiasts are meeting in Berlin on Wednesday, the 15th April, 2009 at 19:30. Find all the details here. And since I will be in Berlin this time, I just simply redeclare this to “Django/Dojo Stammtisch” instead of just “Django Stammtisch” :-). I hope all the djangoers are ok with that (I requested permission in #django-de). It just makes things easier to also meet some dojo people in Berlin. I will also have some cool new dojango stuff to show off! So if AJAX, JavaScript and Dojo people are around, it would be cool to meet you there and chat about what’s hot and how the beer is. Please add yourself to the attendees list on doodle. And thanks again to the Berlin djangoers for organizing this, I am looking forward to it.