Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Por: Juanjo
Qué cositas? A mi, por ejemplo, me gustaría que se puedan mandar mensajes a muchos usuarios a la vez. No lo probé mucho aún como para encontrar otras cosas De todas formas, siempre se pueden enviar parches. -
Python and Django Setup for Mac OS X Leopard
Python and Django Setup for Mac OS X Leopard -
Por: Gonzalo
¡Qué bueno! No me gustan algunas cositas de esa aplicación en particular, pero es genial que se vayan traduciendo los ‘pluggables’ que hay para Django -
Edit Inline Support for Generic Relations
Introduction I've recently (past week or so) been digging into the newforms-admin branch of django. I am really looking forward to this code line getting merged into trunk as there are tons of great work in this branch. I especially like the separation of the admin code from the models. Well, I'll get to my point. The Problem I needed to be able to edit child records in the admin that were children through the use of GenericRelations. I was told about a solution on Google Code called django-genericadmin, but it seemed dead and I could not get it to work. The thing that seemed the closest to working was a patch on ticket 4667 by Honza Kral and a variation on this patch in the Django Snippet 765. Neither of these worked for r7771 of branches/newforms-admin. The Solution I put the 765 snippet in a file called generic.py in the root of the django project I was working on and fiddled with it until I got it working. I ended up needing to change an import, fix some variable names, and change the argument list order in one of the init methods. I also added the can_order and can_delete … -
Edit Inline Support for Generic Relations
Introduction I've recently (past week or so) been digging into the newforms-admin branch of django. I am really looking forward to this code line getting merged into trunk as there are tons of great work in this branch. I especially like the separation of the admin code from the models. Well, I'll get to my point. The Problem I needed to be able to edit child records in the admin that were children through the use of GenericRelations. I was told about a solution on Google Code called django-genericadmin, but it seemed dead and I could not get it to work. The thing that seemed the closest to working was a patch on ticket 4667 by Honza Kral and a variation on this patch in the Django Snippet 765. Neither of these worked for r7771 of branches/newforms-admin. The Solution I put the 765 snippet in a file called generic.py in the root of the django project I was working on and fiddled with it until I got it working. I ended up needing to change an import, fix some variable names, and change the argument list order in one of the init methods. I also added the can_order and can_delete … -
LaunchPad
I signed up with Launchpad today – don’t know why I hadn’t really done it earlier, other than I just didn’t think to or have any projects that drove me there. The project du jour that lured me in was … Continue reading → -
Reversed publishing with Django
>>> from django.core.template import * >>> c = Context( { 'ctnt': 'this is a test' } ) >>> t = Template( """ {{ ctnt|slice:"::-1" }} """ ) >>> t.render( c ) ' tset a si siht ' >>> badum-dum-chh. Post to Del.icio.us -
Introducing FRF, the Fiam's RSS Framework
I'm starting to notice a problematic pattern in Django: some components are not extensible at all. There's no problem when you are using it in the same way the framework developers intended, but when you want to do something which deviates from the Django standard, you're screwed. That's what happened to me yesterday. I wanted to add a RSS feed for public notes at byNotes, featuring GeoRSS information, but as far as I'm concerned Django Syndication Framework doesn't allow the framework user to define new fields. So I've choosen to write a simple but extensible RSS Framework. Each new field is a class, which can be plugged inside a channel or inside an item. In addition, I've also used a view-as-class approach without any templates, requiring the application feed class to return the field contents. However, every field also defines its own formatter, so the application feed class does not need to return the text, only the object the formatter expects (e.g, the pubDate field expects a datetime object, while the link field expects an URL). There are some things I like in the Django Syndication Framework, so I've kept them. For example, feeds can receive parameters via get_object() and … -
Immutable Django model fields
I wanted to make a field on a Django model read-only after it was assigned an initial value. Maybe I was having a slow day, or my Google-fu was especially lacking, but I couldn't find a documented way to do this. There's the editable Field option, but I wanted to ensure I couldn't mistakenly overwrite the initial value anywhere — not just in the admin interface or form processing. It turned out to be pretty easy. -
PyCon teraz w Polsce
Autorem poniższego tekstu jest Katharsis Rybnik pozazdrościł Pcimowi Pythona i organizuje po raz pierwszy polską edycję konferencji PyCon. PyCon PL, jedyna w Polsce konferencja poświęcona w całości językowi programowania Python odbędzie się w dniach 18-19 października 2008. Celem... -
Wersja 1.0 już niedługo!
Niedawno pojawiła się informacja, że już niedługo wyjdzie bardzo oczekiwana wersja 1.0 Django. Termin został ustalony na 2. września. Dokładna lista rzeczy, które będą dodane i te które zostaną być może dodane wraz z dokładnymi terminami znajduje się na stronie: VersionOneRoadmap -
group_required decorator
Here is a decorator that I came up with to augment the already available login_required and permission_required decorators. This one takes a group name and makes sure the logged in user is a part of it. def group_required(group_name, login_url='/accounts/login/'): def wrap(view_func): def in_group(request, *args, **kwargs): from django.contrib.auth.models import Group try: group = request.user.groups.get(name=group_name) except Group.DoesNotExist: [...] -
Django Developers Needed
Calling all Django developers looking for work! I’m looking for some people to rely on for freelance work, as well as scouting a full time position near San Diego. -
byNotes launched
I've just launched the new geomicroblogging site I mentioned a few days ago. It still isn't as powerful as FireEagle, since the web API is still not ready, but I expect to finish it by next week. However, there are also additional features not present in FireEagle (according to what I've read, since I can't try FireEagle): You can send messages. You can send events, and when people reply to them they can specify if they're attending. You can also send links, with oEmbed support. You can build a network of friends and send them private notes. You can become a fan of someone and you'll receive his public notes (like following someone on twitter, but you can also know where he is). You can update your position only for some of your friends, the rest of them will see your previous position. Registration with OpenID is supported. Registration is currently open to everyone, but I'm going to close it as soon as there are users enough for doing some real-world testing. Wanna try it? Go ahead and start geomicroblogging today. As for the source code, I'm not sure if I'll release all of it. However, there are some portions … -
Código do site disponível para baixar
Como prometido anteriormente, o acesso à leitura no sistema de controle de versões deste website foi liberado. Isso quer dizer que agora é possível baixá-lo. Para tal, você precisará do Bazaar instalado (provavelmente existe um pacote para seu sistema, verifique na página de download do mesmo). O site foi escrito em Python utilizando o framework de desenvolvimento web Django, portando será necessário tê-lo instalado também para caso queira testá-lo em seu computador. Siga as instruções no Guia de Instalação. Caso ainda não conheça o Django, talvez seja interessante o estudo de sua documentação para entendimento do código. Baixando Para obter o código do site, utilize a ferramenta de linha de comando bzr: bzr branch http://code.taurinus.org/sementeproject/mainline/ sementeproject O código em http://code.taurinus.org/ está sendo disponibilizado em um "dumb server", então não espere por uma boa performance. Executando Antes de mais nada, você precisará também dos seguintes pacotes instalados em seu PYTHONPATH: Diário Tagging Comment Utils Template Utils Será necessário também o uso da biblioteca CSS libcss-taurinus, seus arquivos deverão estar em media/css/lib/. Experimente fazer assim: bzr export http://code.taurinus.org/libcss-taurinus/mainline/ sementeproject/media/css/lib/ Enfim, para rodar o projeto localmente, execute o seguinte comando: sementeproject/sementeproject/manage.py runserver Mais informações no site do projeto. -
Django Software Foundation
The Django guys have scored another milestone today with the creation of the Django Software Foundation. Being a huge Open Source advocate I love hearing great news like this. You can read more about the foundation at: Announcing the Django Software Foundation New Foundation for Django On an unrelated note, an article I wrote for LinuxPro Magazine last November about using Perlbal was recently put online. You can read it at The Juggler -- Let the nimble Perlbal webserver keep your traffic in balance . -
Olá mundo!
É com muita satisfação que, enfim, coloco meu website pessoal no ar! Quem me conhece sabe que há vários anos estou pelejando por isso e, felizmente, hoje foi o dia. Devagar e sempre! Assim as coisas vão acontecendo(?). Como podem perceber, o formato do site é um weblog. Procurarei escrever sobre as coisas que estou envolvido no dia-a-dia, mais especificamente com Software Livre, GNU/Linux, Administração de Sistemas, Desenvolvimento de Software e, eventualmente, assuntos relacionados à música, vegetarianismo e movimentos sociais. O site foi desenvolvido apenas com ferramentas livres (Emacs, Gimp...) e com o auxílio do framework web Django. Algumas aplicações para Django também foram fundamentais para a conclusão do site: Diário Tagging Comment Utils Template Utils O código do site também está disponível como software livre (GPLv3) e você pode visualizá-lo através do site do projeto. Em breve liberarei o acesso ao controle de versões para que seja possível baixá-lo. A idéia é que o código sirva de referência àqueles que estão estudando Django e para quem possui interesse em um site pessoal utilizando este framework. Toda crítica é muito bem-vinda! Minha pretensão é deixar público o conhecimento que adquirir ao longo do tempo e também aprender com os outros. … -
A better(?) serialization framework: part 3
I think I've finally found the perfect syntax for defining new serializations in your application code. You no longer will need to return the element name. Instead, it'll be taken from the function name, but you can override it via decorator. However, there's an exception to this rule. The default function will always return the object class name into lowercase. In addition, there's a new decorator for extending a serilization. Let's see how it looks: from wapi import serializers class UserProfileSerializer(serializers.BaseSerializer): @serializers.objname(name='my_friend') def friend(self, obj, *args, **kwargs): return { 'username': obj.user.username, 'avatar': 'http://bynotes.com/_m/avatars/%s' % obj.avatar, } @serializers.objname('my_friend_location') @serializers.extends('friend') def friend_position(self, obj, *args, **kwargs): return { 'position': { 'latitude': 5, 'longitude': 9, } } from notes.models import UserProfile serializers.register(UserProfile, UserProfileSerializer) As you can see, now serializations can be extended in the same way they are created and you won't need to write the object name again if it matches the function name. On the other hand, I've finally decided to bundle this serializers as part of the (soon-to-be-released) wapi application, which provides a foundation for exposing web apis in an easy way. -
Vagas para Freelancer Django, Webdesigner e DBA
Estou a procura de bons profissionais para trabalharem comigo em alguns projetos que participo. A princípio, necessito de profissioanais com conhecimentos em Python (Django), Webdesigner (HTML, CSS, JavaScript, Ajax e Design em sí) e DBA para banco de dados MySQL. De preferência que seja um candidato que more no eixo São Paulo – Rio de [...] -
A better(?) serialization framework: part 2 (first alpha release)
I've made some progress on the serialization framework and I think it's ready for an alpha release. Here is the code, but I suggest you to finish reading this entry, since there are a few changes since the last post :). In first place, I decided to remove backwards compatibility, because these serializers are totally different than the ones in Django. Django serializers are clearly designed for exchanging full objects between applications or dumping the object database into a file. They happen to be usable for exposing a web API, but that's not their main purpose. On the other hand, these serializers are designed with a web API framework in mind. They are not intented for exchanging full objects, instead they intend to help you exposing data for your web API clients. That's a totally different purpose and I think both things don't mix well. In addition, I like the UNIX design philosophy, do one thing and do it right. As for importing this code into Django, I think there's no problem keeping both serialization frameworks. In my humble opinion, these newserializers should replace the current serializers, because the former have a potentially wider audience. I don't find myself needing … -
Aprenda o Google App Engine no ShowMeDo
Tem muita gente falando do Google App Engine, realmente a idéia é bastante interessante e não é complicado para desenvolver uma aplicação (se você tiver conhecimentos de Python). Aproveitar todo o poder de processamento do Google para criar páginas dinâmicas sem se preocupar com a infra estrutura de alta disponibilidade é o sonho de qualquer [...] -
A better(?) serialization framework
The current Django serialization framework is not good enough for me. My current annoyances are: You can only serialize object fields. If you have defined some properties over the elements, you can't serialize them. You can not properly nest fields (e.g. serialize the user profile and include the username, you'll only get the foreign key) There's no way to configure some "presets". If I always serialize a class with the same fields, I need to write fields=('foo', 'bar') multiple times (where's DRY when you need it?). You cannot pass arguments to serializations. This could seem like something strange, but I find it usefull and others might do. E.g.: I'm currently developing a geomicroblogging site (yes, I've coined that term - 0 hits on Google right now -, think of it like Twitter+Pownce+FireEagle). One of the API endpoints returns where your friends are, but their locations depend on the viewer because you can send your position privately to just one of your friends (the rest will see the previous one). Let me say this serialization framework is useful for passing raw objects between multiple applications understanding the format, since you can do deserialization on the data and get the exact object … -
Django 1.0 roadmap and timeline
Finally we have a Django 1.0 roadmap and timeline. Jacob Kaplan-Moss posted today on Django devolopers. I must say this roadmap seems very realistic and the only thing that I will miss is the aggregation support, that is promised to be released in a future version, maybe in 1.1. -
Django 1.0 roadmap and timeline
Finally we have a Django 1.0 roadmap and timeline. Jacob Kaplan-Moss posted today on Django devolopers. I must say this roadmap seems very realistic and the only thing that I will miss is the aggregation support, that is promised to be released in a future version, maybe in 1.1. -
The Real Problem with Django
The Django development team does not receive enough credit. Thank you: Adrian, Simon, Jacob, Wilson, Malcolm, Georg, Luke, Russell, Robert and the rest.