Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Swoop Travel Live!
I'm pleased to announce that Foundry's first web site has gone live: Swoop Travel. Swoop Travel is a GeoDjango site using PostgreSQL and PostGIS, although very little GIS functionality is in the public-facing site at the moment - it's mainly in the backend. We built this from scratch in about a month (while juggling other projects too!) are are pretty pleased with how it's turned out. This is just the first iteration and we're looking forward to expanding the site. GeoDjango is pretty awesome. As we work on the site and get more experience, I'll post some more about some of the innards: there's quite a lot of interesting stuff in the backend, particularly admin customisations like filtering dropdowns based on landmarks within geographic regions, and so on. I'll also try to talk about the production server configuration, as GeoDjango needs a slightly different WSGI configuration to the standard run-of-the-mill Django site. -
Swoop Travel Live!
I'm pleased to announce that Foundry's first web site has gone live: Swoop Travel. Swoop Travel is a GeoDjango site using PostgreSQL and PostGIS, although very little GIS functionality is in the public-facing site at the moment - it's mainly in the backend. We built this from scratch in about a month (while juggling other projects too!) are are pretty pleased with how it's turned out. This is just the first iteration and we're looking forward to expanding the site. GeoDjango is pretty awesome. As we work on the site and get more experience, I'll post some more about some of the innards: there's quite a lot of interesting stuff in the backend, particularly admin customisations like filtering dropdowns based on landmarks within geographic regions, and so on. I'll also try to talk about the production server configuration, as GeoDjango needs a slightly different WSGI configuration to the standard run-of-the-mill Django site. -
Swoop Travel Live!
I'm pleased to announce that Foundry's first web site has gone live: Swoop Travel. Swoop Travel is a GeoDjango site using PostgreSQL and PostGIS, although very little GIS functionality is in the public-facing site at the moment - it's mainly in the backend. We built this from scratch in about a month (while juggling other projects too!) are are pretty pleased with how it's turned out. This is just the first iteration and we're looking forward to expanding the site. GeoDjango is pretty awesome. As we work on the site and get more experience, I'll post some more about some of the innards: there's quite a lot of interesting stuff in the backend, particularly admin customisations like filtering dropdowns based on landmarks within geographic regions, and so on. I'll also try to talk about the production server configuration, as GeoDjango needs a slightly different WSGI configuration to the standard run-of-the-mill Django site. -
PyvaScript - Pythonic syntax for your browser
Hey, after a lot of work in the last few weeks I'm finally ready to introduce you to one of our latest projects called PyvaScript. It's a new scripting language for your client side code with a syntax inspired by our favorite language Python. :) So let's take a closer look at what Waldemar conjured up. Why? We all know the pain resulting from switching between programming languages. Writing web projects using Django means to code in Python on the server side and (mostly) to code in JavaScript on the client side. Switching between both languages leads to many bugs and forces us to think differently in each language. This becomes even worse if we first write much of the code in one of both languages over a longer period of time and then switch over to the other one. In the end the result means unnecessary work. The goal of PyvaScript is to solve this problem by giving you the possibility to use a Python like syntax as well as common functions from Python wherever that is possible on the client side too. Thus PyvaScript addresses developers who love Python while still being able to write fast code and … -
Hookbox
Hookbox (via). For most web projects, I believe implementing any real-time comet features on a separate stack from the rest of the application makes sense—keep using Rails, Django or PHP for the bulk of the application logic, and offload any WebSocket or Comet requests to a separate stack built on top of something like Node.js, Twisted, EventMachine or Jetty. Hookbox is the best example of that philosophy I’ve yet seen—it’s a Comet server that makes WebHook requests back to your regular application stack to check if a user has permission to publish or subscribe to a given channel. “The key insight is that all application development with hookbox happens either in JavaScript or in the native language of the web application itself”. -
Django Alphabet Filter Released with International Character Support
My previous post about the alphabet filter explained the first take at creating the alphabet filter. There were several issues, especially with international character sets, so we have revised the code to fix the issues and made it installable via PyPI. The Default Alphabet The default alphabet is the list of characters displayed in the admin even if there is no data for that character. As there is data, the letters of the alphabet are enabled. Any characters not in the default alphabet, but that exist in the data, are added dynamically. There is no easy way to determine what the default alphabet should be based on the language or locale. We hit several barriers while automating the default alphabet: The default character encoding (on a Mac and in English, at least) is ISO-8859-1, but Django tries to interpret it as UTF-8. The default character set includes too many characters. Some languages (I’m looking at you, Spanish) treat certain two-letter combinations as letters (e.g. ch and ll). Due to these issues, the default alphabet is now a setting named DEFAULT_ALPHABET . The default setting is the ASCII alphabet and digits. You can set the DEFAULT_ALPHABET to a string or list or tuple. If you only what the … -
Announcing djangoembed, rich media consuming and providing with Django
I'm pleased to announce the release of djangoembed, a django app for consuming and providing rich media. What is OEmbed? OEmbed is a format for allowing a rich representation of a url. If you've used Facebook you've probably seen this feature before -- linking a YouTube video will embed an actual video player in the news feed, automatically. The player is represented by some HTML, plus there may be additional metadata like the author, a link to their channel, the title of the video, or even a thumbnail. -
Integració del TVP CECA
Després de barallar-m'hi un bon grapat de dies he aconseguit integrar el TPV de CECA en una de les aplicacions que estic desenvolupant per APSL. Com en el cas de la integració amb el BBVA he de dir que la qualitat de la documentació és inversament proporcional al suport que tens dels tècnics, per a que quedi clar: la documentació és pèssima, plena de inconsistències i exemples que no funcionen. El suport dels tècnics de CECA molt bo. Poc temps per a contestat (llevat de si demanes en divendres, clar) i respostes clares i concises. Un deu! Amb la gent del BBVA el mateix, se coneix que els ha tocat bregar amb la documentació. No acab d'entendre què costa mantenir la documentació actualitzada. Si ja no es fa servir un programa per a generar la firma, llavors es refà la documentació i se'n lleva la referència. Si s'incorpora un tag obligatori nou que s'ha d'enviar, llavors s'actualitzen els exemples. Per si a algú més li serveix faig cinc cèntims del que m'he trobat i del que funciona a l'hora d'escriure aquest apunt. Generació de la firma La firma és diferent per l'enviament i per la resposta. En ambdós casos es … -
GvR on commit privileges
Guido van Rossum: Maybe we’ve been too careful with only giving commit privileges to to experienced and trusted new developers. I spoke to Ezio Melotti and from his experience with getting commit privileges, it seems to be a case of “the lion is much more afraid of you than you are afraid of the lion”. I.e. having got privileges he was very concerned about doing something wrong, worried about the complexity of SVN, and so on. -
Europython 2010 talk: Advanced Django ORM Techniques
Here are the slides from my talk at Europython 2010, Advanced Django ORM Techniques. Advanced Django ORM techniques The talk is mainly a summary of the query optimisation tricks I've previously talked about on this blog, although I did begin by explaining briefly how models, fields and relationships work behind the scenes - I'll write some of that up here at some point. I'll also be posting a longer review of Europython here, hopefully in the next few days. Update: here's the (unfortunately fairly poor-quality) video from the talk: -
Europython 2010 talk: Advanced Django ORM Techniques
Here are the slides from my talk at Europython 2010, Advanced Django ORM Techniques. Advanced Django ORM techniques The talk is mainly a summary of the query optimisation tricks I've previously talked about on this blog, although I did begin by explaining briefly how models, fields and relationships work behind the scenes - I'll write some of that up here at some point. I'll also be posting a longer review of Europython here, hopefully in the next few days. Update: here's the (unfortunately fairly poor-quality) video from the talk: -
Release: django-treebeard 1.61
django-treebeard 1.61 has been released (CHANGES). It’s in pypi so you can install it with pip or easy_install. You can get the code in the Mercurial repo. There is also a well maintained Git mirror. Please report bugs in the bug tracker. Share and enjoy. -
Django using Eclipse IDE and Pydev
I’ve been using Wingwares python IDE for Django development for almost 2 years. The Wingware IDE has been very good but I have had a few superficial annoyances with it so decided to look around and see what other IDE’s I could use. This led me to Eclipse. The first time I had a look [...] -
AlertGrid - instant notification in Python/Django
AlertGrid is an interesting online instant notifications service (written in Python/Django) that helps reacting on the custom events (server down, script error, machine stopped) by sending SMS/phone/email notification. -
twod.wsgi 1.0 is out! (Enhanced WSGI support for Django applications)
I'm very pleased to announce that twod.wsgi 1.0 has been released, after several months of production use and preview releases! No bug has been found in the release candidate and therefore the final release has the same code as the candidate one.twod.wsgi allows Django developers to take advantage of the wealth of existing WSGI software, as the other popular Python frameworks do. It won’t break you existing Django applications because it’s 100% compatible with Django and you can start using the functionality offered by this library progressively.Get it while it's hot! -
Easier custom Model Manager Chaining
Easier custom Model Manager Chaining. A neat solution to the problem of wanting to write a custom QuerySet method (.published() for example) which is also available on that model’s objects manager, without having to write much boilerplate. -
Django 1.2 Tutorials: Django by Example
A few Django 1.2 tutorials by andreai.avk covering topics like Django admin customization, comment notification and moderation, thumbnail creation, searching and filtering, and automated testing. Current demos include a To-Do App, a Simple Blog, a Photo Organizing and Sharing App and a Simple Forum. -
What to do when PyPI goes down
Lately PyPI, the Python package index, has been having some availability issues. When PyPI goes down it really hurts Python developers: we can’t install new packages, bring up new development environments or virtualenvs, or deploy code with depedencies. Work is ongoing – see PEP 381 – to add much-needed resiliency to PyPI, and the fruits of these labors are starting to become available. In particular, a number of PyPI mirrors are now available: b. -
Setting up a template_postgis on Lucid
I wasn't able to find instructions in the Django docs for setting up a template_postgis database with postgis-1.5 and Postgres 8.4 on Ubuntu Lucid (10.04). Below is what worked for me. GeoDjango installed via Ubuntu 10.04 packages 1 2 3 4 5 6 7 8 9#!/usr/bin/env bash POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib createdb -E UTF8 template_postgis # Create the template spatial database. createlang -d template_postgis plpgsql # Adding PLPGSQL language support. psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql # Loading the PostGIS SQL routines psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" # Enabling users to alter spatial tables. psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" GeoDjango built from source Use the above script, but change POSTGRIS_SQL_PATH to: POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-1.5 Make sure to run sudo ldconfig after compiling everything, or else postgis won't be able to find geos. You'll see errors like this: psql:/usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql:59: ERROR: could not load library "/usr/lib/postgresql/8.4/lib/postgis-1.5.so": libgeos_c.so.1: cannot open shared object file: No such file or directory -
Reffering to Django docs from your docs using Sphinx
Sphinx is a great documentation tool, and one of it’s built-in extensions is sphinx.ext.intersphinx. It simply takes your objects references for other projects and converts to links in the other project’s documentation. In sphinx-quickstart command, it asks if you want to add this extension. If so, It adds this code to your conf.py file: extensions = ['sphinx.ext.intersphinx'] intersphinx_mapping [...] -
get_first_object_or_none shortcut for Django
I will talk about a shortcut I developed for the Django framework and always use in my apps. This code is aimed in making a quik shortcut to obtain the first object of a queryset if it exists or None otherwise. It’s very useful when you want to display the last news in the first page [...] -
Documenting Django pluggable apps with Sphinx
I decided to document my Django projects with the same tool used by Django team: Sphinx. It is a very good documenting tool, and was used for many other projects, including the Python Project itself. But it has a simple problem with Django, that I found the solution rlazo’s blog. But it still has some problems, [...] -
External apps i18n in Django
Django has the good feature of internationalization. It’s very simple to use that it generates the .po files automatically from your project. All you have to do is complete the .po file with the translated text. To create these files, all you have to do is create a folder in your project called locale and [...] -
MEDIA_URL and context from processors available in HTTP 500 template
It’s easy to create a custom template for HTTP 500 errors. All you have to do is create a file named 500.html in any of the application’s TEMPLATE_DIRS. But in almost all cases you want to use media in this page. It’s good to have an error page with the same look and feel of [...] -
Arquivos do Mini curso de Django disponibilizados
No dia 24 de abril de 2009, no SENAC em Natal/RN, ocorreu o FLISOL. Neste evento, eu ministrei um mini curso de django. Então estou disponibilizando tanto os arquivos_mini_curso desenvolvido durante o curso, como os slides. Mini curso introdutório ao DjangoView more presentations from vbmendes.