Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
More reasons to go to DjangoCon!
I was thinking some more about DjangoCon next month.Capoeira - I'm known for doing one-handed cartwheels. But at last year's DjangoCon I got a chance to try my hand at Capoeira. Since then I've managed to get in some actual regular Capoeira training. My hope is to tag up with Oregon Capoeira and see how my Angola matches their Regional. Even if you've never done a cartwheel, it should still be a blast to try out!Okay, now on to listing some more talks I'm looking forward to having at the conference:Why Django sucks and how we can fix it - While Django is the king of Python web framewrks, Eric Florenzano is going to slam it hard. But he isn't going to just troll the conference, he's also going to provide us some possible solutions. The best thing of all, is that since Django is open source, we can all contribute to make it better!Pony Pwning - Django is a nicely secure framework thanks to the security focus of the community, but Adam Baldwin shows us how as developers we can make compromising mistakes. If you want to avoid being caught with your pants down on a day where you didn't wear clean underwear, go … -
Getting excited about DjangoCon US!
Djangocon starts in just a month. I'm looking forward to this event because of so many reasons. Lets go over some of them!Friends - I'll get to meet with old friends and make new ones. Rather than list names I'm going to mark a sheet of paper with the alphabet and check off letters as I meet/make a friend with the first name that matches an unmarked letter. Which makes me wonder if their is a Django app for that in the making...Portland - Great food and awesome beer at cheap prices. The wonderful thing about Portland is that the base ingredients are really good. I found I liked the simpler/cheaper things there more than fancy foods. The food carts alone are worth visiting the city.Oregon State - It is a beautiful state and since words can't do justice here is an image:Me at Mutnomah falls! The conference schedule rocks! - The talks they lined up all look really good. They range from the basics to the advanced, and include things that go beyond the technical. Some of my favorite picks from just the first day:Typewar: A Case Study - James Tauber is an incredible speaker, not to mention the founder of … -
Using oEmbed in Django
Replacing links to multimedia websites with nice embedded players, thumbs and other content using django-oembed. -
The kind of comments that will get ignored on Django's Trac
Participating in any Open Source project can be frustrating if things do not move along as quickly as you would like. Django is a fairly popular project, whose developers are volunteers with limited resources, and with a pretty big commitment to stability and backwards compatibility, so there will always be people who get frustrated. This blog post is intended to help people in that situation be helpful, and to not actually make things worse. -
Code coverage analysis in Django
-
django-mediagenerator: total asset management
We really weren't posting often enough recently. Now we'll make up for it with an advanced new asset manager called django-mediagenerator. Those of you who used app-engine-patch might still remember a media generator. This one is completely rewritten with a new backend-based architecture and muchos flexibility for the shiny new HTML5 web-apps world (see the feature comparison table). In this post I'll give you a quick intro and after that I'll make another post about some crazy stuff you can do with the media generator. Why oh why? What is an asset manager and why do you need one? Primarily, asset managers are tools for combining and compressing your JS and CSS files into bundles, so instead of many small files your website visitors only need to download a single big JS file and a single big CSS file. This is important because request latency has a much bigger impact on your site's load times than file size. You should definitely read Yahoo's Exceptional Performance and Google's Speed pages to learn more about how to improve your site's performance. The second important task of an asset manager is to help you with handling HTTP caches. This is done by renaming … -
Дизайн API Я.ру
Вчера мы открыли в бету API для Я.ру. Это был первый пост в корпоративном блоге Яндекса с кодом на Питоне, что даже породило фан-арт :-). Для меня этот запуск имеет большое эмоциональное значение, потому что машиночитаемый веб -- мой давний интерес, и этот проект -- первый неигрушечный публичный API, где я занимаюсь дизайном, и могу смотреть, как выживают на практике теоретические соображения о том, как это должно делаться. Я говорю тут от своего лица, и чтобы не возникало ложных ощущений, должен сказать, что я это всё делаю, конечно, не один. Начинал писать собственно серверную часть Иван Челюбеев. Моя текущая роль -- проектировщик и менеджер. Код пишет сейчас Костя Меренков, а со стороны Я.рушного бэкенда нам помогает Серёжа Чистович. Этот пост -- несколько заметок о том, как всё устроено внутри. Пишите в комментариях, если что-то нужно раскрыть подробнее. Сервис над сервисом Сам Я.ру -- многоуровневая кодобаза на нескольких языках и технологиях. Серверная её часть общается с внешним для себя миром по CORBA, и поэтому не подходит для публичного API. Кроме того, публичное API поддерживать тяжелее, чем внутреннее, из-за необходимости думать про обратную совместимость. Поэтому API сервиса Я.ру -- это по сути ещё один отдельный сервис, который смотрит во внешний мир через … -
A Pie... Er, API!
Source: Paul Smith (http://www.flickr.com/photos/psmith/2190712270/) It's no secret that we love data and open information. Forkinit has had an easy way to export your recipes since launch but that's not enough for us. So starting today, Forkinit has it's own API (application programming interface - a way to get raw data out of Forkinit). What we've got now is rough, very 1.0. It's read-only but open to everyone. So if you like code, you might try playing around with the following links: http://forkinit.com/api/v1/recipes/daniel/?format=json http://forkinit.com/api/v1/users/daniel/?format=json http://forkinit.com/api/v1/tags/vegan/?format=json We have plans to further open up the data access and add some more endpoints. If you've got feedback, we'd love to hear it! -
Creating your own Digg/Facebook/Tweetmeme button
This quick walkthrough is going to bring you up to speed on how to create your own social bookmarking button. The three prime examples are the famous Digg button, Facebook’s like functionality and the tweetmeme button. For an implementation look slightly above this paragraph or check out mashable’s version on the left of their post. Our button will be focusing on Fashiolista.com. Fashiolista is a social bookmarking site for fashion, which has seen rapid growth after launching at the next web. This tutorial explains the javascript (client side) aspects of the button. Feedback and improvements on the code would be greatly appreciated. You can find the full 450 lines of js on github. This is what the end result looks like: Compact Medium Large Love it! Love it! Love it! (If you are working on a shop in the fashion industry have a look at our installation instuctions.) Step 1 – The markup Its important to get the client side markup of the button right. Since other sites will be implementing this there is no way you can change it later on. The three major players each have their own way. Facebook XFBML: Async script with XFBML or Iframe Digg … -
man tar
man tar: The GNU folks, in general, abhor man pages, and create info documents instead. Unfortunately, the info document describing tar is licensed under the GFDL with invariant cover texts, which makes it impossible to include any text from that document in this man page. Most of the text in this document was automatically extracted from the usage text in the source. It may not completely describe all features of the program. -
Quick And Easy Execution Speed Testing
There have been many times when I've been programming, encounter a problem that probably involves a loop of some sort, and I think of two or more possible ways to achieve the same end result. At this point, I usually think about which one will probably be the fastest solution (execution-wise) while still being readable/maintainable. A lot of the time, the essentials of the problem can be tested in a few short lines of code. A while back, I was perusing some Stack Overflow questions for work, and I stumbled upon what I consider one of the many hidden jewels in Python: the timeit module. Given a bit of code, this little guy will handle executing it in several loops and giving you the best time out of three trials (you can ask it to do more than 3 runs if you want). Once it completes its test, it will offer some very clean and useful output. For example, today I encountered a piece of code that was making a comma-separated list of an arbitrary number of "%s". The code I saw essentially looked like this: ",".join(["%s"] * 50000) Even though this code required no optimization, I thought, "Hey, that's … -
Quick And Easy Execution Speed Testing
There have been many times when I've been programming, encounter a problem that probably involves a loop of some sort, and I think of two or more possible ways to achieve the same end result. At this point, I usually think about which one will probably be the fastest solution (execution-wise) while still being readable/maintainable. A lot of the time, the essentials of the problem can be tested in a few short lines of code. A while back, I was perusing some Stack Overflow questions for work, and I stumbled upon what I consider one of the many hidden jewels in Python: the timeit module. Given a bit of code, this little guy will handle executing it in several loops and giving you the best time out of three trials (you can ask it to do more than 3 runs if you want). Once it completes its test, it will offer some very clean and useful output. For example, today I encountered a piece of code that was making a comma-separated list of an arbitrary number of "%s". The code I saw essentially looked like this: ",".join(["%s"] * 50000) Even though this code required no optimization, I thought, "Hey, that's … -
Show Django AdminSite fields depending on the current user
Introduction The auto-created AdminSite in Django is a nifty feature for creating an administrative view of your model classes. Somehow it is not perfect, even if you want to customized it. To guide you to my problem and solution you've to know, that I implemented the SoftDelete behaviour for model classes as described by Greg Allard. It simply adds a 'deleted' field to each model marking it as deleted if its deleted in the admin site (or in some application) but never really gets deleted from the database. So in the admin site there is this field 'deleted' displayed, if you have configured it. The Problem My project has 2 different 'usergroups', the editors and the superusers. Superusers should see the 'deleted' fields, the others not. Unfortunatly that is not possible out of the box with Django. The solution I'm not the first one struggling with the user dependent display of model fields. Luke Plant found a solution for an older version of Django dealing with the field display in the add/change view. Later he updated the thing as the Django version grew. I adapted some lines of his last code for the add/change view and wrote something new to … -
Django settings.py for development and production
So you developed a Django web application and now need to deploy it into production, but still need to actively continue development (bugfixes, tweaks, adding and testing new features, etc.) In your development environment you probably had debugging enabled, performance settings disabled, used SQLite as your database, and other settings that make development easier and faster. But in production you need to disable debugging, enable performance, and use a real database such as MySQL or PostgreSQL, etc. Hopefully, your development environment can simulate your production environment as well, sort of staging, so your final tests prior to deployment provides the smallest delta. Sometimes you need to emulate the full production environment. Sometimes you need to emulate the full development environment. Sometimes a mixture of the two. This leads to the question, how do you seamlessly manage your development and production settings without adding overhead? It turns out there is quite a lot of discussion on how to setup Django settings.py that supports both a development and production environment, for example: Completely different settings.py files (usually you configure the webserver to add the production settings to the python path, and use the default (development) settings when using the dev webserver. By hostname By variable (PRODUCTION = True) We recently came across this issue when … -
Show Django AdminSite fields depending on the current user
Introduction The auto-created AdminSite in Django is a nifty feature for creating an administrative view of your model classes. Somehow it is not perfect, even if you want to customized it. To guide you to my problem and solution you've to know, that I implemented the SoftDelete behaviour for model classes as described by Greg Allard. It simply adds a 'deleted' field to each model marking it as deleted if its deleted in the admin site (or in some application) but never really gets deleted from the database. So in the admin site there is this field 'deleted' displayed, if you have configured it. The Problem My project has 2 different 'usergroups', the editors and the superusers. Superusers should see the 'deleted' fields, the others not. Unfortunatly that is not possible out of the box with Django. The solution I'm not the first one struggling with the user dependent display of model fields. Luke Plant found a solution for an older version of Django dealing with the field display in the add/change view. Later he updated the thing as the Django version grew. I adapted some lines of his last code for the add/change view and wrote something new to … -
Show Django AdminSite fields depending on the current user
Introduction The auto-created AdminSite in Django is a nifty feature for creating an administrative view of your model classes. Somehow it is not perfect, even if you want to customized it. To guide you to my problem and solution you've to know, that I implemented the SoftDelete behaviour for model classes as described by Greg Allard. It simply adds a 'deleted' field to each model marking it as deleted if its deleted in the admin site (or in some application) but never really gets deleted from the database. So in the admin site there is this field 'deleted' displayed, if you have configured it. The Problem My project has 2 different 'usergroups', the editors and the superusers. Superusers should see the 'deleted' fields, the others not. Unfortunatly that is not possible out of the box with Django. The solution I'm not the first one struggling with the user dependent display of model fields. Luke Plant found a solution for an older version of Django dealing with the field display in the add/change view. Later he updated the thing as the Django version grew. I adapted some lines of his last code for the add/change view and wrote something new to … -
Show Django AdminSite fields depending on the current user
Introduction The auto-created AdminSite in Django is a nifty feature for creating an administrative view of your model classes. Somehow it is not perfect, even if you want to customized it. To guide you to my problem and solution you've to know, that I implemented the SoftDelete behaviour for model classes as described by Greg Allard. It simply adds a 'deleted' field to each model marking it as deleted if its deleted in the admin site (or in some application) but never really gets deleted from the database. So in the admin site there is this field 'deleted' displayed, if you have configured it. The Problem My project has 2 different 'usergroups', the editors and the superusers. Superusers should see the 'deleted' fields, the others not. Unfortunatly that is not possible out of the box with Django. The solution I'm not the first one struggling with the user dependent display of model fields. Luke Plant found a solution for an older version of Django dealing with the field display in the add/change view. Later he updated the thing as the Django version grew. I adapted some lines of his last code for the add/change view and wrote something new to … -
SaaS with Django and PostgreSQL
How to isolate customer's data from one another (one database per customer). -
Django settings.py for development and production
So you developed a Django web application and now need to deploy it into production, but still need to actively continue development (bugfixes, tweaks, adding and testing new features, etc.) In your development environment you probably had debugging enabled, performance settings disabled, used SQLite as your database, and other settings that make development easier and faster. But in production you need to disable debugging, enable performance, and use a real database such as MySQL or PostgreSQL, etc. Hopefully, your development environment can simulate your production environment as well, sort of staging, so your final tests prior to deployment provides the smallest delta. Sometimes you need to emulate the full production environment. Sometimes you need to emulate the full development environment. Sometimes a mixture of the two. This leads to the question, how do you seamlessly manage your development and production settings without adding overhead? It turns out there is quite a lot of discussion on how to setup Django settings.py that supports both a development and production environment, for example: Completely different settings.py files (usually you configure the webserver to add the production settings to the python path, and use the default (development) settings when using the dev webserver. By hostname By variable (PRODUCTION = True) We recently came across this issue when … -
Django settings.py for development and production
So you developed a Django web application and now need to deploy it into production, but still need to actively continue development (bugfixes, tweaks, adding and testing new features, etc.) In your development environment you probably had debugging enabled, performance settings disabled, used SQLite as your database, and other settings that make development easier and faster. But in production you need to disable debugging, enable performance, and use a real database such as MySQL or PostgreSQL, etc. Hopefully, your development environment can simulate your production environment as well, sort of staging, so your final tests prior to deployment provides the smallest delta. Sometimes you need to emulate the full production environment. Sometimes you need to emulate the full development environment. Sometimes a mixture of the two. This leads to the question, how do you seamlessly manage your development and production settings without adding overhead? It turns out there is quite a lot of discussion on how to setup Django settings.py that supports both a development and production environment, for example: Completely different settings.py files (usually you configure the webserver to add the production settings to the python path, and use the default (development) settings when using the dev webserver. By hostname By variable (PRODUCTION = True) We recently came across this issue when … -
Django-websocket parce que sans chaussettes, le web, il pue un peu des pieds
Et oui, malgré la chaleur, malgré les vacances, la plage et l'appel de starcraft 2, malgré tout cela, je reste fidèle au poste et je publie une django app du mois. Bon ok, c'est le dernier jour du mois, mais je suis encore dans les clous. Mais par contre, vu que c'est l'été, les vacances, ... -
Mark Shuttleworth on Tribalism
Mark Shuttleworth: Tribalism is when one group of people start to think people from another group are “wrong by default”. It’s the great-granddaddy of racism and sexism. And the most dangerous kind of tribalism is completely invisible: it has nothing to do with someone’s “birth tribe” and everything to do with their affiliations: where they work, which sports team they support, which linux distribution they love. […] Let’s be clear: tribalism makes you stupid. -
Django Training in the UK
Update Mar 30 2011: I have just announced dates for Django training in London. Please see the Django Training website for more details. In Autumn 2010 I will be running several Django courses throughout the UK. There will be 2 different types of courses: Django template design – 1 day – for html/css coders who [...] -
Swoop Travel Live!
Foundry's first GeoDjango site, Swoop Travel, has gone live. -
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.