Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Features of a good Django plugin
Well, my opinion on them anyway. -
Even better than I thought
Yesterday, I blogged about a positive experience I had with Packt Publishing's relationship with Open Source projects. In that blog entry, I called on companies, including Packt, to give more back to the communities that produce Open Source, including financial contribution where possible. It has since been drawn to my attention that Packt already contributes financially to the Django Foundation, as well as other Open Source projects. Packt pays a royalty back to projects when they sell books on an Open Source topic Packt - I salute you again for this excellent policy, and I apologize for the error on my part. My broader comment still stands: there are many companies that derive profit from open source, but give little if anything back to the projects from which they derive that profit. To those companies - I strongly encourage you to follow the example of Packt. -
Doing the right thing
My life has been fairly busy of late. My daughter was born on June 19; Django v1.1 is almost out the door; and we have lots of interesting stuff underway at work. So, when Packt Publishing contacted me asking if I would like to review their recently released book, I declined. I barely have enough time to read books at the moment, let alone review them. However, I asked if I could have a complimentary copy anyway. After all - I am a Django core developer, and if I (and many other people) hadn't volunteered my time to develop Django, Packt wouldn't have a topic to publish a book about. To my surprise, they agreed. Sitting on my hard disk is a freshly downloaded copy of "Django 1.0 Template Development", by Scott Newman. If Django template development sounds like something you might be interested in knowing more about, and you want to know more about this book, a sample chapter is available. I find this kind of attitude encouraging. It would have been very easy to dismiss my request, but Packt took the opportunity to give a little something back to the community that enables them to derive financial benefit. … -
An update on the book
So, the repository for the second edition of Practical Django Projects is not yet done, but due to the general clamor I’m opening up public access; you can browse it, or check out a copy of the code, from its page on Bitbucket. You’ll probably want to have a look over the README file displayed on that page, since it provides helpful information on how the repository works. Right now the first three chapters’ worth of ... Read full entry -
An update on the book
So, the repository for the second edition of Practical Django Projects is not yet done, but due to the general clamor I’m opening up public access; you can browse it, or check out a copy of the code, from its page on Bitbucket. You’ll probably want to have a look over the README file displayed on that page, since it provides helpful information on how the repository works. Right now the first three ... Read full entry and comments -
Professionalism
Yes, it’d be nice if contractors kept up to date on the progress of the various building codes. They don’t. There are a lot of people who asked about the building codes in the 1970s and were told (right or wrong) what they were. So they went ahead and learned their trade, build their homes, and chose watching a DVD or spending time with their kids over watching city council do battle over asbestos insulation. -
An if-substring-in-string Django Template Construction
Here's a quick tip for Django template hackers. It's a known fact of Django templates that the syntax is purposefully limited. I've been living with the need for an if-substring-in-string construction. Of course, I could write a custom template tag, but work is quitebusy. So on a whim and a 10 minute break I tried this yesterday, and it worked well for me. Take a look and let me know what you think.First, the problem.Bookmark FormattingI have a custom app for pulling in my Delicious bookmarks and formatting them as link posts here on this site. I include the HTML I want in the original bookmark and have a bit of template code to insert preview images generated by ShrinkTheWeb. When I link a YouTube video, I do a quick cut-n-paste of the video to embed the player, and in these cases, I don't want to include the preview image. In Python, this would be super simple: if 'http://www.youtube.com/' not in link_url: show_thumb() However, Django templates don't have a similiar syntax.A Solution Using {% with %}So here's what I did: {% with link_url|slice:":23" as short_url %} {% ifnotequal short_url "http://www.youtube.com/" %} My ShrinkTheWeb image goes here. {% endifnotequal %} Other … -
Django and nginx settings
Django and nginx settings -
EveryBlock libera su código fuente
Hace un par de días se ha liberado el código de EveryBlock bajo licencia GPL. EveryBlock ofrece noticias e información local sobre barrios de distintas ciudades de Estados Unidos. Se trata de uno de los sitios web más interesantes que utilizan Django. El código fuente se puede encontrar dividido en distintos paquetes en el sitio oficial. El código incluye paquetes que trabajan con información geográfica, el sistema de publicación completo de EveryBlock y hasta un paquete de blog y otro de wiki. -
AvaTint Launched!
The site very simply takes your avatar and turns it into any color you select. The online community is starting to do this to support and protest many things. This is the 2.0 way of making your page background black for a cause. We created this site in 90 minutes using Django on June 19th. I got home from dinner and noticed that some twitter icons were coming in green. This caught my attention because I had suggested yellow to protest Obama's massive government spending a few days earlier. I mentioned this to Rudy Menendez (yes related) and suggested it would be useful for the less tech savvy to create a page to change an avatar's color. We knew the Pyhon package PIL could do this and Rudy found jscolor as a color selection tool. Together we created and deployed this application. The timeline is roughtly as follows: 12:25am CT Floated the idea to Rudy via IM 12:30am CT Created local proof of concept that PIL could handle it 12:35am CT Created local project diretory 12:38am CT Download jscolor 12:56am CT Registered domain 1:14am CT Rudy jokes about test scripts 2:00am CT Start deploy to production server and test 2:10am … -
SVN usability
Okay, time to import this code into SVN. svn import, right? This should be easy! svn import https://...../trunk/ Oh crap, that tried to import everything. ^C Guess I’ll just set svn:ignore. svn propset . svn:ignore svn propset svn:ignore . svn propedit svn:ignore svn propedit svn:ignore . Okay. Can’t do that on a non checkout. Fine. cd .. svn co https://...../trunk/ myproject.svn cd myproject.svn/ mv ../myproject/* . Right, okay. Add some files now. -
MySQL Backup Skript mit Emailversand.
A while ago I found a good script for backing up a MySQL database and sending it via email to a recipient here. The script is cool, but I didn't like its structure and the fact, that you have to add the database values inline and that it can only backup a single database. For this reason I rewrote it a little and you can download it here. Features: Backup of mutliple databases Sending of backups to multiple users For every single database a mail is send and there is no file saved on the server. And wow: it's really easy to configure! How do I use it? Download the current version (0.1) Adjust the backup.php (you're getting help by my wonderful comments) upload everything to a directory of your choice if applicable, create a cronjob to periodically execute the script And here the backup.php that calls the appropriate classes and executes the backup (also included in the download): ini_set('error_reporting', E_ALL);// include the filesrequire_once 'MySQLConfig.php';require_once 'MySQLBackup.php'; // add some databases to backup// the domain will be appended to the email subject and is also included within the sql file for identification.$cfgHost0 = new MySQLConfig('username0', 'password0', 'database_name0', 'domain0');$cfgHost1 = new MySQLConfig('username1', 'password1', … -
MySQL backup script with emailing
A while ago I found a good script for backing up a MySQL database and sending it via email to a recipient here. The script is cool, but I didn't like its structure and the fact, that you have to add the database values inline and that it can only backup a single database. For this reason I rewrote it a little and you can download it here. Features: Backup of mutliple databases Sending of backups to multiple users For every single database a mail is send and there is no file saved on the server. And wow: it's really easy to configure! How do I use it? Download the current version (0.1) Adjust the backup.php (you're getting help by my wonderful comments) upload everything to a directory of your choice if applicable, create a cronjob to periodically execute the script And here the backup.php that calls the appropriate classes and executes the backup (also included in the download): ini_set("error_reporting", E_ALL); // include the files require_once "MySQLConfig.php"; require_once "MySQLBackup.php"; // add some databases to backup // the domain will be appended to the email subject and is also included within the sql file for identification. $cfgHost0 = new MySQLConfig("username0", "password0", … -
MySQL backup script with emailing
A while ago I found a good script for backing up a MySQL database and sending it via email to a recipient here. The script is cool, but I didn't like its structure and the fact, that you have to add the database values inline and that it can only backup a single database. For this reason I rewrote it a little and you can download it here. Features: Backup of mutliple databases Sending of backups to multiple users For every single database a mail is send and there is no file saved on the server. And wow: it's really easy to configure! How do I use it? Download the current version (0.1) Adjust the backup.php (you're getting help by my wonderful comments) upload everything to a directory of your choice if applicable, create a cronjob to periodically execute the script And here the backup.php that calls the appropriate classes and executes the backup (also included in the download): ini_set("error_reporting", E_ALL); // include the files require_once "MySQLConfig.php"; require_once "MySQLBackup.php"; // add some databases to backup // the domain will be appended to the email subject and is also included within the sql file for identification. $cfgHost0 = new MySQLConfig("username0", "password0", … -
MySQL backup script with emailing
A while ago I found a good script for backing up a MySQL database and sending it via email to a recipient here. The script is cool, but I didn't like its structure and the fact, that you have to add the database values inline and that it can only backup a single database. For this reason I rewrote it a little and you can download it here. Features: Backup of mutliple databases Sending of backups to multiple users For every single database a mail is send and there is no file saved on the server. And wow: it's really easy to configure! How do I use it? Download the current version (0.1) Adjust the backup.php (you're getting help by my wonderful comments) upload everything to a directory of your choice if applicable, create a cronjob to periodically execute the script And here the backup.php that calls the appropriate classes and executes the backup (also included in the download): ini_set("error_reporting", E_ALL); // include the files require_once "MySQLConfig.php"; require_once "MySQLBackup.php"; // add some databases to backup // the domain will be appended to the email subject and is also included within the sql file for identification. $cfgHost0 = new MySQLConfig("username0", "password0", … -
A fun little bug
About two months ago, I quietly wrote and released a little Django application which generates cross-domain policy files for Flash (if you’ve never encountered this aspect of Flash, here’s an introductory article on how it works). I’ve done a bit of hacking on it in my spare time, and I’m pretty happy with it as an example of a simple, tightly-focused application; sometime soon I hope to write a bit more about the development process ... Read full entry -
A fun little bug
About two months ago, I quietly wrote and released a little Django application which generates cross-domain policy files for Flash (if you’ve never encountered this aspect of Flash, here’s an introductory article on how it works). I’ve done a bit of hacking on it in my spare time, and I’m pretty happy with it as an example of a simple, tightly-focused application; sometime soon I hope to write a bit more ... Read full entry and comments -
Link Exchange For Tough Times
Advertising on Google is getting expensive, very expensive. This year advertising costs for Adwords rose between 40% and 60% for some advertisers. Companies like eBags.com and Babyage.com have seen the cost of advertising online soar to 45% of the cost of the product they are trying to sell. Margins are diminishing and [...] -
Practical Django Projects
June 2009 News Update: The second edition of this book has been released! The 2nd edition of Practical Django Projects has been released making this series of posts redundant! Notes and a practical companion I've been reading James Bennett's excellent Practical Django Projects (PDP), which uncritically I think is the best python based book I've read since I picked up Mark Lutz's Learning -
Psychic IRC Support In 10 Easy Steps
This list is somewhat specific to Django and #django channel on freenode.net. Psychic support is what people are looking for when they expect others to just know their development environment and their code. If one doesn’t supply enough information on the problem, no matter how good a hacker the person on the other end of [...] -
Second edition
So just after lunch today a box arrived, containing copies of the second edition of Practical Django Projects, which went through final editing about a month ago (Apress tends to be pretty quick at getting the book printed and shipping). Since I assume that means other people will be getting copies of the book soon, I’d like to cover a couple important bits of information. First of all, the second edition (as the cover proudly declares ... Read full entry -
Second edition
So just after lunch today a box arrived, containing copies of the second edition of Practical Django Projects, which went through final editing about a month ago (Apress tends to be pretty quick at getting the book printed and shipping). Since I assume that means other people will be getting copies of the book soon, I’d like to cover a couple important bits of information. First of all, the second edition (as the cover ... Read full entry and comments -
Untitled
hej -
Untitled
hej -
Что такое pip?
Pip это альтернатива easy_install, а как говорят сами разработчики - замена. Как известно easy_install только часть глыбы под названием setuptools. Много копий сломано по поводу нужно ли такие двухголовое чудовище, которое позволяет продвинутым образом собирать питонячьи пакеты и их устанавливать. Или достаточно стандартного distutils. Вот тут pip выступает как противоположность, говоря - я сборкой пакетов не занимаюсь, а только их ставлю. Pip может поставить любой пакет собранный при помощи distutils. Причем только source-пакет - никаких бинарных яиц ему и прочих setuptools'овых прибамбасов. Эта концептуальная простота во многом помогла pip постепенно выйти на уровень широко используемого инструмента в питон-сообществе. Благо и пользоваться им максимально просто: # pip install wna где wna - это некий пакет (для примера я возьму код своего блога). Так же преимуществом pip безусловно является более полезный вывод информации о процессе установки и репортинг ошибок во всяких непредвиденных ситуациях. Помимо уже собранных source-пакетов pip может брать исходники пакетов из систем контроля версий. Поддерживаются subversion, mercurial, git, bazaar. Делая checkout и устанавливая через python setup.py с ключом devel, дает возможность иметь в папке /src/packet_name/ исходный код и при необходимости редактировать его. # pip install -e hg+http://bitbucket.org/daevaorn/turbion/#egg=turbion Где egg=turbion говорит pip чтобы он сделал checkout в /src/turbion/. Очень полезная возможность, …