A Django site.
November 22, 2008

Jesús del Carpio
jj
Jj's blog
» Access MEDIA_URL from static Javascript files in Django

This is an old trick, that’s been very handy :) .

Many times for various reasons you’ll need to access your media files from your Javascript files, to display images, change paths, or whatever. And in most cases your development MEDIA_URL and production MEDIA_URL will be different, so having to change them depending on the enviroment can be a bit tricky being them static files I’m assuming you are using static files your your .js right?.

What I do to help this is add the following to my base.html :

<script type="text/javascript">
    var MEDIA_URL = "{{MEDIA_URL}}";
</script>

before I load any of my .js files, and in them I simply refer to the MEDIA_URL variable just as in my Django templates.

Of course, you need to have your settings.MEDIA_URL variable on template context via whatever method you feel mor confortable with, personally I use context_processors :) .

November 14, 2008

Jesús del Carpio
jj
Jj's blog
» Django cheap pages

Sometimes I end up using Django for the wrong thing, just to dispatch pages and put all my content in the templates. Flatpages are too flat and other DB based content tools are too complex. I just want to use the dispatcher, and the templates (I know, I could use web.py, or whatever other Python tool).

So, In order to save myself some time, I made cheap_pages.py, which is a wrapper for the patterns() method that will populate it with direct_to_template calls.

So instead of doing this:

>>> url(^name/$,
...    direct_to_template,
...    {'template': 'name.html'},
...    name='name')

I can do this:

>>> page('name')

Or instead of this:

urlpatterns = patterns('',
    url(^pages/page1/$,
       direct_to_template,
       {'template': 'page1.html'},
       name='page1')
    url(^pages/page2/$,
       direct_to_template,
       {'template': 'page2.html'},
       name='page2')
    url(^pages/page3/$,
       direct_to_template,
       {'template': 'page3.html'},
       name='page3')

)

I can do this:

urlpatterns = build('pages/', ['page1', 'page2', 'page3'])

I’ve added the file to Google Code under Django-cheap-pages, in case anyone is interested in improving it :) .

November 1, 2008

Antonio Ognio
gnrfan
Gnrfan.org
» Halloween 2008

When I was a kid here in Peru we didn’t celebrate Halloween at all. October 31th is for the day of peruvian folk music and tomorrow is also a holiday but today Halloween time got us inspired at work and got some pumpkins to carve some cool designs on them.

Since we are a Django shop at Aureal we got this Django pumpkin carved:

This is how my desktop looked today for a while at work. I’ve posted this pic to Deskograpy too.

October 31, 2008

Jesús del Carpio
jj
Jj's blog
» Happy Django-ween

The folks here at Aureal did a great job carving the Django pumpkin :D .

Django-ween
Django Pumpkin Django pumpkin

October 30, 2008

Jesús del Carpio
jj
Jj's blog
» Mi charla de Introducción a Django

El fin de semana pasado tuve la oportunidad de dar nuevamente una charla de Django en el evento OpenSource Day de la Universidad San Martín de Porres.

Introducción a Django

Aquí están mis diapositivas de Introducción a Django, y aquí el código de ejemplo usado.

Los archivos son válidos para Django 1.0.

December 29, 2007

Gustavo Picón
tabo
Hacking for fun and profit
» Django Book

We interrupt these wonderful 6 months without posting in this blog to share the joy, directly from Django’s BFDLs, my christmas present to myself:

Got my django book

The Django Book! I bought it in Amazon and it was only 3 days late to Peru, not bad for christmas season.

I can’t wait to read this book. I did read the chapter previews in the site and they were very good. I’ll write a review of the book as soon as I finish reading it.

(btw, I’m sick of wordpress, it’s a buggy piece of ^*($#, is there a decent django powered blog with an import-from-wordpress feature?).

November 12, 2007

Pedro Muñoz
droper
» FESOLI 2007

Este sábado diez de Noviembre asistí a la Universidad Inca Garcilaso de la Vega para dar una charla titulada Django: Desarrollo web en un Triz.

En primer lugar debo agradecer a Tabo ya que mis diapositivas estuvieron inspiradas en las suyas, una forma elegante de decir que las resumí e hice algo más coloridas.

Salí de casa a eso de las 8pm, pase por la casa del gnomo y de ahí nos dirigimos al local de la facultad de sistemas de la UIGV en la av. Bolívar. En la puerta nos identificamos como expositores, entramos y fuimos amablemente recibidos por miembros de COSOLIG quienes nos orientaron. Dí mi charla ante un público que me sorprendió gratamente por su número, por la hora (9am) pensé que iba a exponer frente a cuatro gatos pero no fue así.

En el ambiente destinado para servir de descanso a los expositores teníamos bocadillos, gaseosa y café a nuestra disposición mientras charlaba entre otros con Necudecu y RICHARD, miembros de APESOL a los cuales no conocía.

Continuó el día, las charlas magistrales, una de ellas dada por Breno el cual aprovecho para anunciar el próximo lanzamiento de un nuevo e interesante proyecto. La mesa redonda (¡¡APESOL DEBE!!), cierre del evento y las palabras de rigor.

Luego de esta somera descripción me quedan algunas impresiones que comunicar.

En primer lugar estoy gratamente sorprendido por el apoyo que la UIGV proporciona a COSOLIG, incluso altas autoridades de la universidad estuvieron presentes en el evento y prometieron su apoyo públicamente, algo que nunca he visto en ninguna otra comunidad del país.

La organización muy buena, se cumplió el horario planeado, miembros del lug apoyando en cada aula y proporcionando todo lo necesario para hacer muy agradable nuestra participación en el evento.

Otro punto a resaltar es la gran cantidad de chicas en la comunidad, fenomeno inédito en el software libre, me gustaría saber cual fue su secreto.

Para terminar, estoy gratamente sorprendido por todo lo que vi y estoy seguro que va a ser una comunidad que dará mucho que hablar.

Las fotos del FESOLI ya fueron publicadas, al igual que las fotos de RICHARD.

Exponiendo
Necudecu, RICHARD, el buen Droper y Blackhand
RICHARD, Necudecu, Breno, Droper, Blackhand y Cinthia de Cosolig

October 20, 2007

Xbito tech blog
xbito
Xbito Tech Blog
» Django Date Added and Modified

There has been some discussions in the django-developers list about removing auto_now and auto_now_add helpers for the date related fields. Since this functionality is very useful in those discussions some methods has been suggested, but i think that there has been no further advance in this subject.

For a new project I have been working on we are using trunk code and we want to be sure that for the launch date we still have full functionality, so we created 2 custom fields in order to be able to use them directly on the models and have the desired values automatically set. They work for DateTimeFields only, but the idea could be used also for DateFields.

In a file named fields.py we put this:

from django.db import models
import datetime

class AddedDateTimeField(models.DateTimeField):
def get_internal_type(self):
return models.DateTimeField.__name__
def pre_save(self, model_instance, add):
if model_instance.id is None:
return datetime.datetime.now()
else:
return getattr(model_instance, self.attname)


class ModifiedDateTimeField(models.DateTimeField):
def get_internal_type(self):
return models.DateTimeField.__name__
def pre_save(self, model_instance, add):
return datetime.datetime.now()

Then in any models file we can import them and just use! Something like this for example:

class Location(models.Model):
""" Some place's ubication """
name = models.CharField(_('Name'), maxlength=64, blank=False)
date_added = AddedDateTimeField(_('Date added'), editable=False)
date_modified = ModifiedDateTimeField(_('Date modified'), editable=False)
I hope the community finds this useful!

October 18, 2007

Xbito tech blog
xbito
Xbito Tech Blog
» Search and Replace in Vi

We are working at a client adapting an already developed project so they can do their work with it. The project was developed using django, first with 0.91, then with 0.95, now we are going to use svn trunk. So one of the things that we are using, and a lot, is just plain search and replace. I am currently developing a lot on my Vaio Laptop, using Windows Vista as OS, and Komodo Edit as editor. It has great Find and Replace capabilities, well really i don't know if that could be complicated.

So, the server is a Centos 4, some problemas with the drivers didn't allow us to use our classic FreeBSD, we are still dealing with the issues of using python 2.3 instead of 2.4 which we are used to. So that and the trunk thing are the main reasons to do a lot of searching and replacing.

A great deal of deveolpment is done at a workstation, there it was easy to follow the GUI and just point and click. In Centos it is another story, I use vi or vim normally, even at my workstation at Aureal I use gvim and I love it. But the thing I never learned was to search and replace using plain vi commands. To make things worse I have, like, 2 or 3 points of experience out of 100 in sed. So I knew that it had to be a similar syntax, the classic:

:s/oldstring/newstring/g

So I tried that, but no, it worked only to replace the oldstring in the current line, that was not what I wanted. So once again google knows it all. It gave me the simple and expected answer in the first returned link. It confirmed that the above string just replaces oldstrings in the current line. But, as vi is a great great editor, you can give the command more parameters, so I learned that you could pass a range of line numbers to apply the search and replace, so I just thought that I could use something like this:

:1,$s/oldstring/newstring/g

On a side note, I just recently learned that the $ means "last line". That really helps a lot! But it turns out that there is a shorter way to write this using:

:%s/oldstring/newstring/g

So the % would be equivalent to "1,$".

And thats it, I just learned that this week. And it is useful! I know, for a developer with 3 years of experience not knowing that would be like a sin, but I just never need it like a did today.

July 9, 2007

Gustavo Picón
tabo
Hacking for fun and profit
» Unicode support in Django and Feedjack

(???sq?? d?l? ?po??un ??? ?o dl?? ??? ???? ?lq?ssod u??q s?? ?sod s???)

??? ???? s??lqo?d ???? no? ?? ?ou? ?? ??l ????s o?u??p ??? u? ?s?l????? ?u???od ??? ???? ?s?? ???? s?? ?? ??? ??oddns o? ??u??? ?lq???d?o?u? sp??????q ?s??? (?u??? ?) ??? ?u?????o? ?? ? os ‘????p??? ?o uo?s??? ?s???l ??? ??o?q ?p???dn s???

?(????o? ???? ?o ?z?s ??? ?? ?ool ?sn?) ??u??q s??? u? ??o? ?u?z??? s?? ?o? ???uu?p??? ?lo?l?? o? sopn? ???oddns ?po??un ????? s?? ‘s???n?u?l ????o ???lun ‘uo???d ?sn???q ?lq?ssod ?u?????os ‘????? ?po??un ?l??ld?o? ?o? o?u??p o?? s??p ??os

Some days ago Django got completly Unicode aware, something possible because Python, unlike other languages, has great Unicode support. Kudos to Malcolm Tredinnick for his amazing work in this branch (just look at the size of that commit).

This upgrade broke the latest version of Feedjack, so I am commiting the (I think) first backwards incompatible change to support it. It was very easy with the Porting Checklist in the Django site. Let me know if you have problems with it.

(this post has been possible with the help of the Unicode Flip website)

July 1, 2007

Gustavo Picón
tabo
Hacking for fun and profit
» Release: Feedjack 0.9.10 - Django powered Feed aggregator

A new version of Feedjack has been released: Feedjack 0.9.10.

Changes:

  • Fixing CSS tags for styles 4 and 5
  • feedjack_update now strip()s tags before storing them
  • feedjack_update shows the feed number being processed
  • We no longer cache the tags in feedjack_update, it had encoding problems
    and makes the script safe to run more than one instance at the same time

I said that 0.9.9 would be the last release in the 0.9 branch. I lied. 0.9.10 is a maintenance/bugfix release. The 0.10 branch of feedjack is on the works.

Share and enjoy.

March 1, 2007

Gustavo Picón
tabo
tabo :: para todos y para nadie
» Django, desarrollo web para perfeccionistas con deadlines

Queridos chicheros:

Django, desarrollo web para perfeccionistas con deadlines es el nombre de la charla que daré mañana, gracias a una invitación de la Asociación Nacional de Webmasters Perú, en su evento Plataformas de desarrollo y administradores de contenidos.

Esta es la primera charla de la Asociación este año, se llevara a cabo el dia 2 de marzo en el auditorio de CONCYTEC (Calle del comercio 197, San Borja). La charla va a ser de 4 a 7 p.m. y comenzaremos puntuales.

Los temas a tratar son :

* Ruby on Rails por Rúben Dávila Santos
* Drupal en 15 gotas por Alexis Bellido
* Django, desarrollo web para perfeccionistas con deadlines por Gustavo Picón


Los espero!

tags:

February 4, 2007

Gustavo Picón
tabo
Hacking for fun and profit
» Release: Feedjack 0.9.9 - Django powered Feed aggregator

A new version of Feedjack has been released: Feedjack 0.9.9.

Changes:

  • Fixed i18n related bugs in the templates
  • Fixed a bug related to the –settings option in feedjack_update.py
  • The feeds per user, tag and user/tag are working again
  • You can choose between rss2 and atom in the feeds for user, tag and
    user/tag
  • The default /feed/ url now redirects to /feed/atom/ instead of
    /feed/rss/

You are encouraged to update to this version, it has all the acumulated bug fixes known at this moment (thanks Petar).

This will also be the last version of the 0.9 branch. The 0.10 branch (currently trunk) will have several modifications in the data model, so please be careful if you update your site via subversion. Just follow the right branch or install only official releases and you will be safe.

Also, if you are running a Feedjack site, please update your links to our new site: www.feedjack.org. You can also announce your site in the Feedjack mailing list so we can add a link in the project site.

Share and enjoy.

December 6, 2006

Gabriel Puliatti
predius
comentarios peruanos
» Why Django kicks Ruby on Rails’ collective ass.

Django and Ruby on Rails seem to have surpassed all other frameworks like Turbogears or Symfony and are the talk of the web developing blogosphere, RoR going as far as making Ruby notable again, making it known to many people, as this language was almost unknown in 2004, before RoR’s opening. When I tried to do a quick web app I had to do, I skimmed over the two frameworks, finally deciding with Django to do my work on. As I moved on, I saw that Django, while not as hyped and AJAXy as Ruby on Rails, is much better and workable with than it’s main competitor. Ten Eight reasons why Django kicks Ruby on Rail’s ass.

1. Python.

Python drives Django, as many would know. Each time you write a line of code in a Django app, if it’s not on templates, you’re writing Python. This means that you’re able to use the large base of Python developers worldwide, and also the amazing number of Python libraries, coming from it’s 16 years of being heavily used, going into places such as Google, NASA and even some games such as EVE Online or the great Civilization IV. Furthermore, since Python has a more active userbase and more frameworks, if Adrian Holovaty, Jacob Kaplan-Moss and all of the Django developers suddenly dropped dead after I finish writing this, the porting of the code would be much easier than if Rails’ development stopped, where you would be stuck in the middle of nowhere if you ran into an issue. And who doesn’t want a language which has an implementation called IronPython?

2. Documentation

Django’s documentation kicks everyone’s ass. Not just Rails’. Django has a pretty documentation, easily understandable by both newbie and expert developers. Then, if by chance there’s something which can’t be found in the official documentation, there’s always a great ticketing system where many people posted code snippets and small howto’s, and awesome blogs such as B-List which help a troubled user to do everything from extending the user model, to being a master over generic views. However, Rails’ documentation seems confusing at first, with external tutorials and a massively confusing documentation repository.

Furthermore, the main Django developers decided to make an open book, which they have posted on the web and is open for comments, using a Django based publishing site they built, and some of Yahoo!’s Javascript libraries. The main problem with the many Rails books that there are is that they do not try to complement the Documentation, they are the documentation.

3. Templating.

Since Django’s inception, the templates have been designed so that there is no need to be a programmer to know how to create the templates. This means that the design can be split, making for skinnable sites and the ability to outsource the design to a designer, and not need that designer to pick up a book on Ruby on Rails’ in order to make the site pretty. Furthermore, since Django tries to keep as much coding away from the template as possible, the template’s are most often much more readable than the ASPish or even Cthulhuian .rhtml syntax that Rails’ programmers and designers have to use to design and display the processed information. Django’s system makes for much better cleanness using filters, which modify the way your text will be rendered, and template inheritance, making it easy to make dynamic websites.

4. Speed

Both Python and Ruby developers pride on the fact that both programming languages are fast. While they are slower than C and Java, they are probably the fastest in development times, allowing the developers to see the clear picture and work as fast as possible, avoiding as many errors on the way as they can. However, while both compete fairly in development times, the actual processing speed for a Python program is much faster than a Ruby program, while they are working on this. However, the same thing happens in the frameworks, which clearly show that Django is faster than both Rails’ and Symfony, a PHP framework. This means that your apps will be able to take a hammering better if they’re programmed using Django than if they’re using Ruby on Rails.

5. Free, JustWorksâ„¢ Admin interface

Django doesn’t need any MySQL managers, SQLite command line interfaces or any way to change records on the database, because it already has one. Every app is able to, by uncommenting two lines, have a full fledged admin interface containing all the modules that were written and have been marked for inclusion in it. Not only that, but the models may be modified so they appear differently in the admin panel, as it is fully customisable, making it easy to show some choices as drop down boxes or radio, or filtering by fields, etc. This is why none of the Django screencasts nor any of the tutorials need anything more than Django and a text editor, while you see all of the Rails’ screencasts, which there are lots, always having an open MySQL manager. Oh, and the admin interface in Django is damn hotâ„¢, too.

6. Generic views and feeds

With Django, there is no need to program when the operations being done are listing or editing objects, listing entries by date, or any of the basic CRUD operations, which means that the developer’s time can be spent doing useful things, not just getting simple things from the database, or directly editing fields. Furthermore, since Django was made in a publishing environment, creating RSS feeds is as easy as choosing what you want to pull out from the database and into the feed, and choosing where the feed will be retrieved from. This manages to take away the boredom in creating web apps, which in many cases involves cutting and pasting a lot of code, to create, edit or view, sort and manage items which are mostly alike. Django takes away all of this.

Django also has what they call the Flatpages, making it easier to create and select the URL of unchanging information, such as an about or contact page. Furthermore, it can also be edited, all using the Django admin, which makes it even easier than using HTML, not having to create a file nor edit urls.py to point the URL desired to the flatpage.

7. Better support and server

While both frameworks do not have much usage of big enterprisey databases, Django goes further than Rails on database support, as it supports MS SQL without having to do ugly hacks. Of course, its support for SQLite, MySQL and PostgreSQL is top-notch, with Postgres being used in all of Lawrence’s sites, which get millions of visitors each day. Furthermore, Django supports, thanks to the Python WSGI more webservers, as it gives more choice for the admin and more flexibility on setup. It does work on mod_python, which is a problem Rails has, as when it is used with mod_ruby, it has some security problems when running multiple sites on the same server, or just using FastCGI, which is not always optimal, especially due to configuration.. Further on, each Django process ends up being cheaper than having Ruby processes, meaning faster web apps.

8. Django is (mostly) buzzword free

Django isn’t plagued by buzzwords, as Rails is. Rails’ is to much that it’s own name, RoR has become a massive buzzword everywhere, even by people who will never program anything. Now that programming Rails is what the cool kids do, there is a lost value on a language, as the hype goes on and on. Especially having things like AJAX, Web 2.0, XML-RPC. Ruby on Rail’s ends up coercing developers into using too much AJAX, because “it’s way too easy”. The problem is that you get people trying to use AJAX where it doesn’t belong, and you get the complaints that the Web is going backwards in speed and loading times. However, Django is the balance. You can use RSS, if you want to. You can use AJAX, if you want to. You can even have sitemaps, if you want to.

If you want to be cool, and have loads of friends, snazzy AJAX for login scripts which end up failing when you forget to provide a fallback, or you can try the techie way, and bask in the tub of good code, simple design and choice, while not losing speed or reliability. Not at all.

EDIT: My apologies to Adrian Zolovaty Holovaty. It is Holovaty, as the developer himself says.

November 16, 2006

Gustavo Picón
tabo
Hacking for fun and profit
» Release: Feedjack 0.9.8 - Feed aggregator

A new version of Feedjack has been released: Feedjack 0.9.8

Changes:

  • Internationalization (petar)
  • Fixed and infinite loop in feedjack_update.py (do’h!) (petar)
  • Added Serbian (Latin) translation (petar)
  • Updated the feedparser calls in feedjack_update.py (petar)
  • Added Spanish translation (predius)

Thanks to Petar Mari? for all his hard work! This release is 90% his work :-)

August 19, 2006

Gustavo Picón
tabo
Hacking for fun and profit
» Guido van Rossum and Django Redux

Some moths ago I wrote about the BDFL considering the use of the Django web framework.

Cronologically it went like this:

Please Teach me Web Frameworks for Python! (2006-01-27)

Literally a cry for help. He didn’t quite like the magic in Django, considering he used a pre magic-removal version.

Web Framework Redux (2006-01-30)

Perhaps WSGI represents the “blank slate” approach; Rails/Django represent the wizard approach; I’m still looking for the ideal mix-and-match solution.

Django vs. Cheetah: 1-0 (2006-01-31)

Guido is beginning to like the Django templates.

Which Part of “No XML” Don’t You Understand?

This one is related to his previous post. Guido just think that the use of XML in a template engine is WRONG. I couldn’t agree more.

Django Gaining Steam (2006-5-4)

Guido talks about Jacob’s Django talk in the Bay Area and Jeff Croft’s Django for non-programmers (a great article).

Months after that, Guido got interviewed in FLOSS weekly (2006-08-04) and he declared:

Leo La Porte (LL): Python doesn’t have a native GUI, there is TCL/tk… is that an issue?

Guido van Rossum (GvR): It seems to be coming less and less of an issue because more and more people are doing everything over the web

LL: The web is an interface, yeah

GvR: So of course that doesn’t really solves the problem because then you have, as I say, more web frameworks than keywords in the language. My personal favorite and I expect that will remain personal favorite for a long time is something named Django.

LL: I was going to ask you about Django. There was just a … just somebody published some article, interesting I think it was in the Rails website testing Django, Rails and a Perl framework and Django was by far the fastest.

GvR: Interesting! I didn’t hear about that.

Chris di Bona (CdB): How do you measure something like a web framework?

LL: Well they set a simple site and they used web testing applications to create lots of transactions and measure transactions and Django was like significally faster. So tell us about Django.

GvR: I am a very satisfied user of a very small part of Django. Django is sort of, I would call it probably a second generation web framework in Python where first generation would be things like Zope and Twisted. Django was originally started I think two guys who work for, believe it or not, a newspaper in Kansas. Not a very glorious location.

CdB: Well, it’s funny because Zope and Plone came out of the (??) newspaper.

LL: Well you know why, they have to streamline production workflows, that’s a big deal for a newspaper

GvR: Maybe that’s the case. This paper in Kansas decided that they wanted to set a local website with information for people in their town that was very responsive to the audience. They wanted to publish things very quickly but also not just add new articles to the site which everybody can do, but change the site completly, add new ideas, new features to the site, add new applications. They came up with endless number of examples, for example publish the sports, like the local sports results of the little league complete with hyperlinks to the teams and photos and all sort of interesting stuff. And they wanted to be able to roll that out very quickly and so I think they did that for maybe two years, and the two guys who did it and working with a bunch of editor who where providing the content, as they were doing that they realized that they needed a framework and they sort of grew a framework out of their first application. As they (??) what kind of things their editors were constantly asking them to them change to the site, they developed more flexibility in all those areas. And at some point they said let’s open source it and they got support from the newspaper. And then a very interesting thing hapenned. I suppose the newspaper is still using Django in some form (they are, and in fact they are selling the CMS they build). I think both of the original developers are no longer working there and they started Django the Open Source Project and what I found really great about that is I talked to those guys a couple of times and see them give presententations and I’ve seen how they work, and they really get open source. And they have a good license, but in my view even more important is the whole process, the way they work with the user community, the way they answer, they find a ballance between chaos and democracy and anarchy and sort of between Cathedral and Bazaar. They let lots of users add new features and provide ideas without losing the original thought and flexibility of the framework and I can think they are really doing a fantastic job at making Django a better product that goes way beyond what that original Kansas newspaper needed.

(now they talk about the Django vs Rails benchmark and how Django is an order of magnitude faster than Rails…)

LL: I will have to take a look at Django, because that’s pretty impressive.

GvR: Absolutely, I highly recommend it.

And yesterday (2006-08-17), at least two sources (Titus Brown and The Third Bit) are talking about what the BDFL said in SciPy 2006:

  • Django is the web framework.
  • It won’t be included in the standard library because of different development cycles, but will (should?) be as “standard” as PIL or NumPy
  • He hopes that Django and TurboGears will converge

There is a discussion about this on reddit.

What do you guys think?

July 31, 2006

Gustavo Picón
tabo
Hacking for fun and profit
» Feedjack got a new home

Things have been moving in the Feedjack front. There are new planets using it, like Debian Perú, Planet SCM and Planet Python@TW, but also apps that use use feedjack on the background like Ian Holman’s Economy Chat and VC Chat.

Also in the news: Feedjack just went into the FreeBSD ports, and I hope to see more Django apps get in there soon.

About the new home, Feedjack is now hosted in www.feedjack.org, and there are some new services too (thanks to Google):

I’m planning to work again on Feedjack very soon, in the meantime don’t forget to report bugs and send your suggestions to the issue tracker.

July 30, 2006

Gustavo Picón
tabo
Hacking for fun and profit
» Django 0.95 released

Finally, Django 0.95 has been released (digg it here). Some of the new features and changes are:

  • Django now uses a more consistent and natural filtering interface for retrieving objects from the database.
  • User-defined models, functions and constants now appear in the module namespace they were defined in. (Previously everything was magically transferred to the django.models.* namespace.)
  • Some optional applications, such as the FlatPage, Sites and Redirects apps, have been decoupled and moved into django.contrib. If you don’t want to use these applications, you no longer have to install their database tables.
  • Django now has support for managing database transactions.
  • We’ve added the ability to write custom authentication and authorization backends for authenticating users against alternate systems, such as LDAP.
  • We’ve made it easier to add custom table-level functions to models, through a new “Manager” API.
  • It’s now possible to use Django without a database.
  • It’s now more explicit and natural to override save() and delete() methods on models, rather than needing to hook into the pre_save() and post_save() method hooks.
  • Individual pieces of the framework now can be configured without requiring the setting of an environment variable. This permits use of, for example, the Django templating system inside other applications.
  • More and more parts of the framework have been internationalized, as we’ve expanded internationalization (i18n) support. The Django codebase, including code and templates, has now been translated, at least in part, into 31 languages. From Arabic to Chinese to Hungarian to Welsh, it is now possible to use Django’s admin site in your native language.

You can also read the full release notes.

May 28, 2006

Gustavo Picón
tabo
Hacking for fun and profit
» Release: Feedjack - A Django+Python Powered Feed Aggregator

Update: 0.9.7 released.

Some months ago I wrote about Feedjack, a Django powered Feed agregator. Finally I have decent templates to release it.

You can read all the details or directly download it.

The basic features are (taken from the readme since I’m that lazy):

Like the Planet feed aggregator:
  • It downloads feeds and aggregate their contents in a single site
  • The new aggregated site has a feed of its own (atom and rss)
  • It uses Mark Pilgrim’s excelent FeedParser
  • The subscriber list can be exported as OPML and FOAF
But FeedJack also has some advantages:
  • It handles historical data, you can read old posts
  • It parses a lot more info, including post categories
  • It generates pages/feeds with posts of a certain category (example)
  • It generates pages/feeds with posts from a certain subscriber (example)
  • It generates pages/feeds with posts of a certain category from a certain subcriber (example)
  • A cloud tag/folksonomy (hype 2.0 compliant) for every page and every subscriber
  • It uses Django templates
  • The administration is done via web (using Django’s kickass autogenerated and magical admin site), and can handle multiple planets.
  • Extensive use of django’s internal cache engine. Most of the time you will have no database hits when serving pages.
Originally written to be used in ChichaPlanet, it is handling now a lot more planets in the same instance:

Share and enjoy.

May 2, 2006

Gustavo Picón
tabo
Hacking for fun and profit
» Django has removed the magic (Great News)

Just some minutes ago, Adrian Holovaty announced that Django’s magical removal branch has been merged to trunk. This means that now the mythical Django-without-the-magic is now the official development version.

We have been using the MR branch in Aureal for almost two months now. The last pre-magic-removal projects were migrated to MR the last week, since we could see that it was very stable. The merging of today just confirms this.

But what does Magic-Removal really mean?

It means mainly removing all the magic modules from django’s models. Also the way the ORM works is even better, and the programmer can do things that couldn’t be possible in pre-MR Django. Sadly, all these changes are backwards incompatible, but I can assure you that migrating a project is very simple, and it’s worth doing it considering the benefits you’ll get.

The Framework is a lot more Pythonic than it was before.

Remember the BDFL’s gripes about Django?

Similarly, I’m not keen on their object-relational mapping approach. There’s too much magic based on name correspondence, and the automatically generated APIs feel a bit unpythonic.

I hope he and all the people that didn’t like all the magic in Django can take another look at the framework, since it is all gone for good now.