Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Offline HTML5 canvas app in Python with django-mediagenerator, Part 1: pyjs
This is the first part in a short series (see also part 2 and part 3) on building a simple client-side offline-capable HTML5 canvas drawing app in Python via Pyjamas/pyjs, using django-mediagenerator. Canvas drawing apps are the "Hello world" of the web apps world, so why not make it more interesting and throw in a few neat buzz word technologies? ;) In this part we'll take a look at running Python in the browser via pyjs, the Pyjamas framework's Python-to-JavaScript compiler. Note that we won't describe the Pyjamas framework, here. Instead, we only use the compiler itself and jQuery. You can build your own client-side Python framework on top of this. We don't use Pyjamas because we believe that a framework optimized for Python can be a lot simpler and more expressive than a simple 1:1 translation from Java/GWT to Python (which the Pyjamas framework is, mostly). Also, in case you wondered, it's important to not mix your backend (server-side) and frontend (client-side) code. Keep your backend and frontend code cleanly separated. Otherwise your app will become an unmaintainable, cryptic mess. We'll focus on the client-side in this series. For the backend you might want to use a simple REST … -
CI is hard!
Buildbot, the venerable Python continuous integration server, has the reputation of being complex and difficult to set up. After spending a couple of weeks deep in Buildbot land, I've come to the conclusion that this reputation, while true, is only partially deserved. That is, Buildbot is complex, but only if you're trying to view it as an out-of-the-box CI solution. Buildbot suddenly starts to make much more sense if you view it as a framework for creating your own CI solution, not a CI server in its own right. You won't find this revelation anywhere in the Buildbot docs, nor in any of the books or online material that cover the tool. There are some good tutorials out there showing how to set up a simple Buildbot instance -- Jeff Younker's Foundations of Agile Python Development has the best one I've run across -- but none of these examples make much sense when setting up a complex buildfarm with complicated requirements. So I'm here to fill that gap. In this series of posts -- I think I'm looking at five parts -- I'll explain this "Buildbot is a CI framework" view, delve into Buildbot's architecture, and then walk through the … -
OEmbed your site's Static Media
You may not know it, but djangoembed can be used to OEmbed your own site's static media. We use it at work to allow users to embed photos they upload through the site. -
CI is hard!
Buildbot, the venerable Python continuous integration server, has the reputation of being complex and difficult to set up. After spending a couple of weeks deep in Buildbot land, I’ve come to the conclusion that this reputation, while true, is only partially deserved. That is, Buildbot is complex, but only if you’re trying to view it as an out-of-the-box CI solution. Buildbot suddenly starts to make much more sense if you view it as a framework for creating your own CI solution, not a CI server in its own right. -
Office hours transcript posted
We held our first open "office hours" this past Friday, November 5th. We've taken the IRC transcript, organized and cleaned it up a bit, and posted it online for those who couldn't make it. We had about fifty people show in IRC where they asked questions on a wide variety of topics including deployment, NoSQL, cloud computing, and contributing to Django. It was a blast! A few of my favorite questions: "How can we 1.5 thousand Django sites" (on a single server)? "What is the stack that you all are recommending/using these days?" "How do you handle patching existing [open source] projects?" We had a great time with this, and will certainly be doing it again in the future. If you'd like to hear about future office hours, follow us on Twitter. Also, if you'd like a chance to ask questions like this in person, you might want to attend one of my Django classes in LA and Boston next month. -
Office hours
Frank and I held our first Revsys "office hours" this past Friday, November 5th. We've taken the IRC transcript, organized and cleaned it up a bit, and posted it online for those who couldn't make it. We had about fifty people show in IRC where they asked questions on a wide variety of topics including deployment, NoSQL, cloud computing, and contributing to Django. It was a blast! A few of my favorite questions: "How can we 1.5 thousand Django sites" (on a single server)? "What is the stack that you all are recommending/using these days?" "How do you handle patching existing [open source] projects?" We had a great time with this, and will certainly be doing it again in the future. If you'd like to hear about future office hours, follow @revsys on Twitter. Also, a shameless plug: if you'd like a chance to ask questions like this in person, you might want to attend one of my Django classes in LA and Boston next month. -
Comparison between Django, Rails and Grails.
-
Office hours
Frank and I held our first Revsys “office hours” this past Friday, November 5th. We’ve taken the IRC transcript, organized and cleaned it up a bit, and posted it online for those who couldn’t make it. We had about fifty people show in IRC where they asked questions on a wide variety of topics including deployment, NoSQL, cloud computing, and contributing to Django. It was a blast! A few of my favorite questions: -
Release classifiers in distutils/pypi
Thanks to Doug Napoleone I'm now aware there is already a convention followed for the python and framework versions, but it appears that not enough people are aware of it. This post is pretty much a reposting of the second comment of the post immediately preceding this one and Doug gets full credit for this post. I'm just repeating his message:The release classifiers in this post should be included in the standard distutils documentation. For the moment, you can see the full list of classifiers here:http://pypi.python.org/pypi?%3Aaction=list_classifiersFor the python language version the classifier is:Programming Language :: Python :: x.y.zWith each version on it's own line. That way you can browse the repository by python version (see the bottom of the page):http://pypi.python.org/pypi?:action=browse&c=214There is also support for frameworks which you can see on that page as well. There it is done with:Framework :: Django :: x.y.zThere is Zope, Plone, and a number of other frameworks already there.In the example you gave the proper, and supported way of writing the metadata is:Programming Language :: PythonProgramming Language :: Python :: 2.4Programming Language :: Python :: 2.5Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Framework :: DjangoFramework :: Django :: 0.96Framework :: Django :: … -
A request for new pypi classifiers
This request is to help enhance Django Packages, PyPM Index, and other projects. This would also help the Python community at large.Would it be possible that a standard be established for listing in PyPI classifiers which versions of a package is known to operate? Using James Bennett's django-registration at http://pypi.python.org/pypi/django-registration as an example (see my bolded, last two lines to understand what I'm trying to demonstrate):Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonTopic :: UtilitiesPython Versions :: 2.4, 2.5, 2.6, 2.7Django Versions :: 0.96, 1.0, 1.1, 1.2.1, 1.3The metadata system I'm writing about in this blog post is specified on the distutils documentation page.I picked a Django package but this could be for Zope, Pyramid, PyQT, or anything.If we had something like this in place then people could quickly identify on PyPI and other resources if a tool can be of use to them or if it needs to be updated to the latest code base. If this already exists, then can someone point me at the existing specification so I can promote it?Edit: Noah Kantrowitz suggested I take a look at … -
Little tip on how to reset ipdb
When I code Django, I leave a server running in a Linux shell. python manage.py runserver Sometimes when I use ipdb to debug some code, the screen input disappears and I can not see what I’m typing. Rather than ^C the server, I prefer to fix the problem. You just need to reset the screen: import os os.system('reset') -
Two new Django classes: deployment and the ecosystem
Want to buff up your Django chops? Learn some cool new tricks for the new year? You should come to one of my new Django classes next month! I'll be teaching two new one-day classes, both of which evolved from common questions we get here at Revsys. Each class is going to be offered twice, once in LA and once in Boston. For the impatient here are some links and quick info: Django Deployment Workshop - Los Angeles - December 6, 2010. Django Deployment Workshop - Boston - December 10, 2010. The Best of the Django Ecosystem - Los Angeles - December 7, 2010. The Best of the Django Ecosystem - Boston - December 9, 2010. For more details on each class, read on... The first class attempts to answer this question: "So... I've written this cool Django site, and it works on my laptop... but now what?" We've increasingly been spending our time helping clients learn how to successfully deploy Django, so I've taken the things we've learned and turned them into the Django Deployment Workshop. You're invited to bring your own Django sites and I'll show you how to put them into production. At the end of the … -
Django classes: deployment, ecosystem
(Cross-posted from the Revsys blog; I think folks here might be interested, too.)Next month I’ll be teaching two new one-day classes, both of which evolved from common questions we get at Revsys. Each class is going to be offered twice, once in LA and once in Boston. For the impatient here are some links and quick info: Django Deployment Workshop - Los Angeles - December 6, 2010. Django Deployment Workshop - Boston - December 10, 2010. -
How to roast a chicken
Look, people, cooking isn’t hard. Some recipes are hard, but really most of the best, classic dishes are as easy as pie [1]. Take a nice roast chicken. It’s showy – whole birds look fantastic – and just about the easiest thing in the world. With a tiny bit of attention to detail you can crank out a delicious meal that’ll knock people’s socks off. If you want to really sound impressive, tell people that the recipe is from Thomas Keller – chef-owner of The French Laundry, one of the best restaurants in the country [2]. -
SEOmoz meetup in Sofia, Bulgaria
First of all I want to thank to Rand Fishkin from SEOmoz and the Webit team for organizing this meetup. For a long time in the web world there was a feud between the developers and the SEO guys. Both groups claiming that their work is more important, more sophisticated and with bigger value to [...] -
Open "Office Hours"
We've been wanting to try this for awhile, but have been too busy to actually try it out until now. Jacob Kaplan-Moss and I will be holding open "office hours" this Friday November 5th between 1-3 PM CDT in IRC. Come join us in #revsys on freenode and pick our brains. Or just come to listen and learn. The concept is pretty simple, Jacob and I (and likely many other knowledgeable Djangonauts) will be in the channel and attempt to answer your questions related to: Django/Python Deployment Scaling/Performance PostgreSQL Anything else we happen to know... We're going to log the discussion and will provide a transcript online afterwards. Update: The transcript is now available. -
Django gotcha: concrete inheritance
Since 1.0, Django’s supported model inheritance. It’s a neat feature, and can go a long way towards increasing flexibility in your modeling options. However, model inheritance also offers a really excellent opportunity to shoot yourself in the foot: concrete (multi-table) inheritance. If you’re using concrete inheritance, Django creates implicit joins back to the parent table on nearly every query. This can completely devastate your database’s performance. To refresh, if you’ve got models like: -
django-FUNserver
Step 1: pip install django-funserver Step 2: Add “funserver” to your INSTALLED_APPS. Step 3: Run manage.py funserver. For best results, don’t do this on a real server. Code is here, for those interested. Read full entry -
Search on djangosnippets.org
Users of djangosnippets.org may have noticed the addition of a few search-related features over the past several months. I'd like to highlight some of the additions that have been made and show how you can implement similar functionality on your sites. All of djangosnippet's search leans on Apache Solr, a powerful search engine built on top of Apache Lucene. Haystack is the search solution for Django apps - it provides a querying interface similar to Django's ORM, handles indexing your models for you, and supports advanced features like "more-like-this" and faceting. Getting set up (angle brackets, anyone?) I've actually written another post on setting up multi-core Solr on Ubuntu 10.04. I got a bit of flak for using tomcat6 as the server - you can definitely go with jetty instead. Jetty is bundled with Solr, check out the examples/README.txt to get started quickly. You might find the following links useful: Installing Solr Apache Solr + Jetty Apache Solr + Tomcat6 When setting up search with haystack, there are two important configuration files to be aware of: schema.xml solrconfig.xml schema.xml The Solr schema is only superficially analagous to a database schema (if your database was just one big freaking table). It … -
django-FUNserver
Step 1: pip install django-funserver Step 2: Add “funserver” to your INSTALLED_APPS. Step 3: Run manage.py funserver. For best results, don’t do this on a real server. Code is here, for those interested. Read full entry and comments -
What's your favorite Django app?
On Twitter, I asked, “what’s your favorite third-party Django app?” Eight hours later, I’ve got about 50 replies. I meant the question to be fairly open-ended – I deliberately didn’t clarify what I meant by “favorite” – and I’m not that popular, so this is by no means an accurate sample of the Django community. Still, the answers are a bit interesting, so let’s take a look: The winners The favorite was… (drumroll please)… South. -
Using web-based image editors with Django apps
Intergrating FotoFlexer, Picnik and Pixlr web based image editors with Django applications -
Python: Virtualenv + pip
"In the Java world there was always a problem with dependencies. All the jars we had to mange by hand – quite awful. Thankfully there is a Maven project which helps us in requirements management. But what about Python? Is there any way to handle necessary libraries? Of course, there is! It is a tandem of virtualenv and pip." by Marcin Swierczynski -
Global Django Permissions
Django has a great solution for web site permissions, it allows the developer to decide how a user can interact with an application based on permissions against models (i.e. database tables). By default a model comes with three permissions, add, change and delete. If these aren’t enough then you can create as many custom model [...] -
Django-qsstats, parce qu’en vrai,on adore tous faire des stats.
Ce mois-ci, j'aurais pu écrire plusieurs django-app du mois. Si j'avais eu le temps. Mais bon, le jour où j'aurais le temps, ça se saura. Du coup, alors que l'horloge tourne et qu'il ne me reste plus qu'un jour et demi pour écrire ma django app du mois et mon polargeek, j'ai décidé d'écrire ...