Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Newsletter #1
February 17th, 2013 We Met Four Years Ago Today! We met at PyCon 2010 in Atlanta on February 17, 2010. Our life together has been wonderful ever since. On Daniel's blog is a recap of how we met and the days that followed. Two Scoops of Django 1.6 is a #1 Python Best Seller! On her blog, Audrey Roy covers the success of Two Scoops of Django 1.6 on Amazon. A week since launch, some hours we're #1 and other hours Mark Lutz's famous Learning Python is in the lead. Our 1.6 edition will be the last ever update to Two Scoops of Django (see our FAQ). It's greatly expanded and full of good stuff. Jason Meridth Wins the Gelato Contest! For the launch we ran a contest, with instructions slightly hidden in the long change list. Readers had to identify the location of our gelato referenceand report it on GitHub. Jason Meridth rose to the occasion and won the prize. When we asked Jason for his snail mail address so we could send him a book, he responded asking that we donate the book to a developer in need instead. Needless to say, we're impressed by his sense of … -
Newsletter #1
February 17th, 2013 We Met Four Years Ago Today! We met at PyCon 2010 in Atlanta on February 17, 2010. Our life together has been wonderful ever since. On Daniel's blog is a recap of how we met and the days that followed. Two Scoops of Django 1.6 is a #1 Python Best Seller! On her blog, Audrey Roy covers the success of Two Scoops of Django 1.6 on Amazon. A week since launch, some hours we're #1 and other hours Mark Lutz's famous Learning Python is in the lead. Our 1.6 edition will be the last ever update to Two Scoops of Django (see our FAQ). It's greatly expanded and full of good stuff. Jason Meridth Wins the Gelato Contest! For the launch we ran a contest, with instructions slightly hidden in the long change list. Readers had to identify the location of our gelato referenceand report it on GitHub. Jason Meridth rose to the occasion and won the prize. When we asked Jason for his snail mail address so we could send him a book, he responded asking that we donate the book to a developer in need instead. Needless to say, we're impressed by his sense of … -
Newsletter #1
February 17th, 2013 We Met Four Years Ago Today! We met at PyCon 2010 in Atlanta on February 17, 2010. Our life together has been wonderful ever since. On Daniel's blog is a recap of how we met and the days that followed. Two Scoops of Django 1.6 is a #1 Python Best Seller! On her blog, Audrey Roy covers the success of Two Scoops of Django 1.6 on Amazon. A week since launch, some hours we're #1 and other hours Mark Lutz's famous Learning Python is in the lead. Our 1.6 edition will be the last ever update to Two Scoops of Django (see our FAQ). It's greatly expanded and full of good stuff. Jason Meridth Wins the Gelato Contest! For the launch we ran a contest, with instructions slightly hidden in the long change list. Readers had to identify the location of our gelato referenceand report it on GitHub. Jason Meridth rose to the occasion and won the prize. When we asked Jason for his snail mail address so we could send him a book, he responded asking that we donate the book to a developer in need instead. Needless to say, we're impressed by his sense of … -
Improving PostgreSQL support in Django with the help of Kickstarter crowd-funding
Some may already know about this - on Kickstarter there is a fund raising for implementing improved PostgreSQL support in Django. Marc Tamlyn is in the lead and at this very moment there are 25 days to go and the project is already reaching extended goals. It looks like we will see another crowd-funding project successful, making Django better. First one - the Django migrations is on its way for a release with Django 1.7. -
Django blog tutorial - the next generation - part 4
Hello again! As promised, in this instalment we’ll implement categories and tags, as well as an RSS feed. As usual, we need to switch into our virtualenv: $ source venv/bin/activate Categories It’s worth taking a little time at this point to set out what we mean by categories and tags in this case, as the two can be very similar. In this case, we’ll use the following criteria: A post can have only one category, or none, but a category can be applied to any number of posts A post can have any number of tags, and a tag can be applied to any number of posts If you’re not too familiar with relational database theory, the significance of this may not be apparent, so here’s a quick explanation. Because the categories are limited to one per post, the relationship between a post and a category is known as one-to-many. In other words, one post can only have one category, but one category can have many posts. You can therefore define the categories in one table in your database, and refer to them by their ID (the reference to the category in the post table is referred to as a … -
The Appendix That Didn't Survive
One of the suggestions we received for new material for Two Scoops of Django: Best Practices for Django 1.6 was a list of links from the book. Thinking this was a good idea and worth a few pages, we decided the list could go into a new portion: 'Appendix G: Links'. Near the end of the project I wrote a script that generated the new appendix. I generated the list and discovered even without any sort of organization besides alphabetization, the content added 12 pages. Think about that for a second... 12 pages of links. I don't know about you, but if I bought a book with 12 pages of links I would scream 'filler'! The decision then was to cut Appendix G from the book. It didn't survive. Or did it? For the sake of posterity, I've included a version of the code used to get the links out of Two Scoops. Instead of generating LaTeX, this generates an HTML list of links from Two Scoops of Django 1.6. Enjoy! Below is the result of that code. Start scrolling! 12factor.net/config 12factor.net 2scoops.co/1.5-transaction-recipe 2scoops.co/1.6-additional-security-topics 2scoops.co/1.6-admindocs 2scoops.co/1.6-allowed-hosts 2scoops.co/1.6-cached_property 2scoops.co/1.6-cbv-generic-display 2scoops.co/1.6-cbv-generic-editing 2scoops.co/1.6-cbv-mixins 2scoops.co/1.6-change-list 2scoops.co/1.6-code 2scoops.co/1.6-coding-style 2scoops.co/1.6-cookie-based-sessions 2scoops.co/1.6-custom-user-model-example 2scoops.co/1.6-db-optimization 2scoops.co/1.6-docs-on-html-scraping 2scoops.co/1.6-errata/ 2scoops.co/1.6-errata 2scoops.co/1.6-format_html … -
The Appendix That Didn't Survive
One of the suggestions we received for new material for Two Scoops of Django: Best Practices for Django 1.6 was a list of links from the book. Thinking this was a good idea and worth a few pages, we decided the list could go into a new portion: 'Appendix G: Links'. Near the end of the project I wrote a script that generated the new appendix. I generated the list and discovered even without any sort of organization besides alphabetization, the content added 12 pages. Think about that for a second... 12 pages of links. I don't know about you, but if I bought a book with 12 pages of links I would scream 'filler'! The decision then was to cut Appendix G from the book. It didn't survive. Or did it? For the sake of posterity, I've included a version of the code used to get the links out of Two Scoops. Instead of generating LaTeX, this generates an HTML list of links from Two Scoops of Django 1.6. Enjoy! Below is the result of that code. Start scrolling! 12factor.net/config 12factor.net 2scoops.co/1.5-transaction-recipe 2scoops.co/1.6-additional-security-topics 2scoops.co/1.6-admindocs 2scoops.co/1.6-allowed-hosts 2scoops.co/1.6-cached_property 2scoops.co/1.6-cbv-generic-display 2scoops.co/1.6-cbv-generic-editing 2scoops.co/1.6-cbv-mixins 2scoops.co/1.6-change-list 2scoops.co/1.6-code 2scoops.co/1.6-coding-style 2scoops.co/1.6-cookie-based-sessions 2scoops.co/1.6-custom-user-model-example 2scoops.co/1.6-db-optimization 2scoops.co/1.6-docs-on-html-scraping 2scoops.co/1.6-errata/ 2scoops.co/1.6-errata 2scoops.co/1.6-format_html … -
The Appendix That Didn't Survive
One of the suggestions we received for new material for Two Scoops of Django: Best Practices for Django 1.6 was a list of links from the book. Thinking this was a good idea and worth a few pages, we decided the list could go into a new portion: 'Appendix G: Links'. Near the end of the project I wrote a script that generated the new appendix. I generated the list and discovered even without any sort of organization besides alphabetization, the content added 12 pages. Think about that for a second... 12 pages of links. I don't know about you, but if I bought a book with 12 pages of links I would scream 'filler'! The decision then was to cut Appendix G from the book. It didn't survive. Or did it? For the sake of posterity, I've included a version of the code used to get the links out of Two Scoops. Instead of generating LaTeX, this generates an HTML list of links from Two Scoops of Django 1.6. Enjoy! Below is the result of that code. Start scrolling! 12factor.net/config 12factor.net 2scoops.co/1.5-transaction-recipe 2scoops.co/1.6-additional-security-topics 2scoops.co/1.6-admindocs 2scoops.co/1.6-allowed-hosts 2scoops.co/1.6-cached_property 2scoops.co/1.6-cbv-generic-display 2scoops.co/1.6-cbv-generic-editing 2scoops.co/1.6-cbv-mixins 2scoops.co/1.6-change-list 2scoops.co/1.6-code 2scoops.co/1.6-coding-style 2scoops.co/1.6-cookie-based-sessions 2scoops.co/1.6-custom-user-model-example 2scoops.co/1.6-db-optimization 2scoops.co/1.6-docs-on-html-scraping 2scoops.co/1.6-errata/ 2scoops.co/1.6-errata 2scoops.co/1.6-format_html … -
API First
Recently, we were faced with the task of writing an API-first web application in order to support future mobile platform development. Here’s a summary of the project from the point of view of one of the developers. Agile API For the first couple of iterations, we had problems demonstrating the project progress to the customer at the end of iteration meetings. The customer on this project was extremely understanding and reasonably tech-savvy but despite that, he remained uninterested in the progress of the API and became quite concerned by the lack of UI progress. Although we were busy writing and testing the API code sitting just beneath the surface, letting the customer watch our test suite run would have achieved nothing. It was frustrating to find that, when there was nothing for the customer to click around on, we couldn’t get the level of engagement and collaboration we would typically achieve. In the end, we had to rely on the wireframes from the design process which the customer had signed off on to inform our technical decisions and, to allay the customer’s fears, we ended up throwing together some user interfaces which lacked any functionality purely to give the illusion … -
Django and Invalid HTTP_HOST headers with nginx
Django has had a setting for allowed hostnames for a while [1], but starting with the 1.5 release it was required [2] to set it. I'm not sure why I only started getting Invalid HTTP_HOST header emails after my upgrade to 1.6, but anyway, they started pouring in. It's a litte confusing why anybody would try to access one of my sites with a fake hostname, but fixing this is easy enough. The example below uses nginx' catch-all server name feature [3]. Raw server { listen 80 default_server; server_name _; rewrite ^/(.*) http://example.com/$1 permanent; } -
Django and Invalid HTTP_HOST headers with nginx
Django has had a setting for allowed hostnames for a while [1], but starting with the 1.5 release it was required [2] to set it. I'm not sure why I only started getting Invalid HTTP_HOST header emails after my upgrade to 1.6, but anyway, they started pouring in. It's a litte confusing why anybody would try to access one of my sites with a fake hostname, but fixing this is easy enough. The example below uses nginx' catch-all server name feature [3]. Raw server { listen 80 default_server; server_name _; rewrite ^/(.*) http://example.com/$1 permanent; } -
Create a blog in minutes on App Engine with Django and Cloud Sql
Intro Django was actively supported at an early stage of the Python runtime in App Engine SDK through the notable django-nonrel framework, a fork of the original project that adds support for NoSql databases. But starting from the App Engine SDK 1.6.2, released more than two years ago, you can instead deploy Django’s official releases and take advantages from the whole stack using Google Cloud Sql. Case study We’re going to setup a minimal project using Zinnia, a blog engine built on top of Django and a fairly complex web application that leverages several components of the framework, a good benchmark for showing how easy can be deploying on App Engine. Prerequisites Setting up the Google Cloud services goes beyond the scope of this article and is well documented, as well as having a working Python environment, so the following it’s assumed: you already started a Google Cloud project a Google Cloud Sql instance is up and running and you created a database for this project you created a bucket on Google Cloud Storage to store media files you have a working installation of Python 2.7 and pip on your local machine you installed and configured the Python App Engine … -
使用Django Extensions开源库扩展你的Django APP
Django Extensions 开源库是Django框架的扩展功能集合,包括management命令扩展, […] -
Moving from Google Code to GitHub
A few weeks back, the Evennia project made the leap from Google Code to GitHub (here). Things have been calming down so it's time to give a summary of how the process went.Firstly I want to say that I liked Google Code. It did everything expected of it with little hassle. It had a very good Issue system (better than GitHub in my opinion) and it allowed us to use Mercurial instead of Git for version control (I just happen to like Mercurial better than Git, so sue me). Now, GitHub is getting to be something of a standard these days. But whereas our users have occationaly inquired about us making the move, I've been reluctant to do so. The problem I did have with Google Code was that I got the increasing feeling that Google didn't care all that much about it. It worked decently, but it was not really going anywhere either. What finally made me change my mind though was an event just after summer last year. There was a bug in Google Code that made the links to online clones disappear. It was worse than that - creating new online clones of the main repo didn't … -
Announcing Two Scoops of Django 1.6
It's our pleasure to announce that after months of research, writing, and review, Two Scoops of Django: Best Practices for Django 1.6 is in available. The result isn't just an update to the previous edition, it's a complete revision: Here is a short list of the changes: Updated for Django 1.6 and designed for both Python 2.7 and 3.3. Over 130 pages of new material, bringing the book to 446 pages. Expanded sections on database transactions, binary fields, security, custom admin skins, creating and maintaining third-party packages, utilities, serialization, built-in exceptions, deployment, and more. 5 new chapters with material on function-based views, consuming REST APIs in templates, deployment, identical environments, and continuous integration. 3 new appendixes on internationalization, settings alternatives, and working with Python 3. More tables! Improved explanations! Corrected spellings! Code examples available for download. Want to know the rest? Read the change list. We're offering the book in printed softcover format on it's product page. Any questions? Read the FAQ. -
Announcing Two Scoops of Django 1.6
It's our pleasure to announce that after months of research, writing, and review, Two Scoops of Django: Best Practices for Django 1.6 is in available. The result isn't just an update to the previous edition, it's a complete revision: Here is a short list of the changes: Updated for Django 1.6 and designed for both Python 2.7 and 3.3. Over 130 pages of new material, bringing the book to 446 pages. Expanded sections on database transactions, binary fields, security, custom admin skins, creating and maintaining third-party packages, utilities, serialization, built-in exceptions, deployment, and more. 5 new chapters with material on function-based views, consuming REST APIs in templates, deployment, identical environments, and continuous integration. 3 new appendixes on internationalization, settings alternatives, and working with Python 3. More tables! Improved explanations! Corrected spellings! Code examples available for download. Want to know the rest? Read the change list. We're offering the book in printed softcover format on it's product page. Any questions? Read the FAQ. -
Announcing Two Scoops of Django 1.6
It's our pleasure to announce that after months of research, writing, and review, Two Scoops of Django: Best Practices for Django 1.6 is in available. The result isn't just an update to the previous edition, it's a complete revision: Here is a short list of the changes: Updated for Django 1.6 and designed for both Python 2.7 and 3.3. Over 130 pages of new material, bringing the book to 446 pages. Expanded sections on database transactions, binary fields, security, custom admin skins, creating and maintaining third-party packages, utilities, serialization, built-in exceptions, deployment, and more. 5 new chapters with material on function-based views, consuming REST APIs in templates, deployment, identical environments, and continuous integration. 3 new appendixes on internationalization, settings alternatives, and working with Python 3. More tables! Improved explanations! Corrected spellings! Code examples available for download. Want to know the rest? Read the change list. We're offering the book in printed softcover format on it's product page. Any questions? Read the FAQ. -
Caktus Completes RapidSMS Community Coordinator Development for UNICEF
Colin Copeland, Managing Member at Caktus, has wrapped up work, supported by UNICEF, as the Community Coordinator for the open source RapidSMS project. RapidSMS is a text messaging application development library built on top of the Django web framework. It creates a SMS provider agnostic way of sending and receiving text messages. RapidSMS has been used widely in the mobile health field, in particular in areas where internet access cannot be taken for granted and cell phones are the best communication tool available. This has included projects initiated by UNICEF country offices in Ethiopia, Madagascar, Malawi, Rwanda, Uganda, Zambia, and Zimbabwe. Modeling RapidSMS on the Django Community The overall goals set forth by UNICEF for this project included improving community involvement by making RapidSMS easier to use and contribute to. Colin accomplished this by using Django's large and active community as a model. The community employs common standards to maintain consistency across developers. Using this best practice for the RapidSMS developers meant easier communication, collaboration, and work transfer. Colin shepherded six releases of the RapidSMS framework over his year long stint including 948 code commits to the repository. Colin broadened engagement in the RapidSMS community by tapping five others at … -
Caktus Completes RapidSMS Community Coordinator Development for UNICEF
Colin Copeland, Managing Member at Caktus, has wrapped up work, supported by UNICEF, as the Community Coordinator for the open source RapidSMS project. RapidSMS is a text messaging application development library built on top of the Django web framework. It creates a SMS provider agnostic way of sending and receiving text messages. RapidSMS has been used widely in the mobile health field, in particular in areas where internet access cannot be taken for granted and cell phones are the best communication tool available. This has included projects initiated by UNICEF country offices in Ethiopia, Madagascar, Malawi, Rwanda, Uganda, Zambia, and Zimbabwe. -
Announcing Two Scoops of Django 1.6!
We (Audrey Roy and I) just released the revised, expanded, and slightly renamed second edition of our book on Django. It's called Two Scoops of Django: Best Practices for Django 1.6, and you can buy it right now in print format on our online store or Amazon.com. Two Scoops of Django: Best Practices for Django 1.6 is chock-full of even more material that will help you with your Django projects. We'll introduce you to various tips, tricks, patterns, code snippets, and techniques that we've picked up over the years. We have put thousands of hours into writing and revising its hundreds of pages of concise, example-packed text. Why Should You Purchase the Second Edition? "I read the first edition cover to cover. The second one raises the bar again. It's pedagogical, entertaining, and thoughtful." —Aymeric Augustin, Django Core Developer, Two Scoops of Django 1.6 Reviewer Why should you buy this updated version of our previous book? Well, it's more than a slight rename, it's been revised and expanded! It's Revised Significant portions of the previous material have been revised, incorporating huge amounts of feedback submitted by our readers over the past year. We listened to suggestions, clarified existing content, and … -
Announcing Two Scoops of Django 1.6!
We (Audrey Roy and I) just released the revised, expanded, and slightly renamed second edition of our book on Django. It's called Two Scoops of Django: Best Practices for Django 1.6, and you can buy it right now in print format on our online store or Amazon.com. Two Scoops of Django: Best Practices for Django 1.6 is chock-full of even more material that will help you with your Django projects. We'll introduce you to various tips, tricks, patterns, code snippets, and techniques that we've picked up over the years. We have put thousands of hours into writing and revising its hundreds of pages of concise, example-packed text. Why Should You Purchase the Second Edition? "I read the first edition cover to cover. The second one raises the bar again. It's pedagogical, entertaining, and thoughtful." —Aymeric Augustin, Django Core Developer, Two Scoops of Django 1.6 Reviewer Why should you buy this updated version of our previous book? Well, it's more than a slight rename, it's been revised and expanded! It's Revised Significant portions of the previous material have been revised, incorporating huge amounts of feedback submitted by our readers over the past year. We listened to suggestions, clarified existing content, and … -
Announcing Two Scoops of Django 1.6!
We (Audrey Roy and I) just released the revised, expanded, and slightly renamed second edition of our book on Django. It's called Two Scoops of Django: Best Practices for Django 1.6, and you can buy it right now in print format on our online store or Amazon.com. Two Scoops of Django: Best Practices for Django 1.6 is chock-full of even more material that will help you with your Django projects. We'll introduce you to various tips, tricks, patterns, code snippets, and techniques that we've picked up over the years. We have put thousands of hours into writing and revising its hundreds of pages of concise, example-packed text. Why Should You Purchase the Second Edition? "I read the first edition cover to cover. The second one raises the bar again. It's pedagogical, entertaining, and thoughtful." —Aymeric Augustin, Django Core Developer, Two Scoops of Django 1.6 Reviewer Why should you buy this updated version of our previous book? Well, it's more than a slight rename, it's been revised and expanded! It's Revised Significant portions of the previous material have been revised, incorporating huge amounts of feedback submitted by our readers over the past year. We listened to suggestions, clarified existing content, and … -
WSGI, Twisted and Server Sent Events
Old-school web applications were easy to create. Big powerful frameworks like Django give you a lot of tools you can leverage. One weak point of all those WSGI framework is that they didn't integrate well with anything that broke outside the usual request-response cycle. The usual approach nowadays is to use WebSockets for real-time communication between browser clients and web servers. The usual way to do that would be to use a server capable of handling many concurrent connections, and use a message bus from the WSGI app to communicate to that service. That is a lot of moving parts. In my use case where I build a lot of intranet applications, deploying and maintaining all this infrastructure is a very big burden, so the result is usually to not even explore this kind of functionality. However, given that I deploy on Twisted, I wanted to explore what kind of cool things I could build on it. Enter SSE Server-Sent Events aren't that new - they have just been shadowed by WebSockets. They are a simple data format that is send from the server to the client via a plain HTTP connection. The Javascript API is quite simple, and it … -
django-storages and AmazonS3
Saving files in the cloud, be it Amazon S3, Azure, or Rackspace, is very common now and almost a requirement. django-storages makes this seemless. This video shows you just how easy it is to get started.Watch Now... -
django-boardinghouse
I wrote a heap of code last April, under the name [Multi-tenanted Django](/2013/04/05/multi-tenanted-django/). It was fairly complete, but not especially well documented, and not really that well tested. Recently, I've been having to write some reporting code at work that dealt with objects that are generated by [django-reversion](http://django-reversion.readthedocs.org/en/latest/). If I was using tenancy-based partitioning, it would be really easy for me to just fetch the changes that were made to data from a given company: instead I need to do heaps of queries, and lots of filtering. Which got me enthused on ``django-multi-schema``, which has since been renamed to ``django-boardinghouse``. And, it now has it's own [documentation](http://django-boardinghouse.readthedocs.org), and an [example project](http://django-boardinghouse.readthedocs.org/en/latest/example.html). I'm still a bit cagey about releasing it to pypi, as the example project is pretty simple, and I'd like to build that (or another project) up a bit to see if I've made any more bad decisions: I've already changed it to opt-in to seperate schema to opt-out, and added in a configurable ``SCHEMA_MODEL``. It currently passes all tests under django 1.4 - 1.6, and has some functionality under django 1.7, but the migration handling code is not well tested just yet.