Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Django with virtualenv on Webfaction
I really like the Django web framework and I like virtualenv enabling me to use different python configs and packages for different projects. And I have to say I like Webfaction, so easy, so good! (No, I don't get paid by them) This is a quick guide on how to setup Django in virtualenv using mod_wsgi with a Webfaction account. Create an "mod_wsgi" application and create a website to use this application connect to your accounts shell using ssh enable Python 2.6.x as default Python interpreter (as written in the Webfaction documentation) echo "alias python=python2.6" >> ~/.bash_profile source ~/.bash_profile python -V install "pip" and "virtualenv" (be sure to use easy_install-2.6 to use the setuptools of Python 2.6.x): easy_install-2.6 -U pip easy_install-2.6 -U virtualenv I like yolk, that enables you to list the installed Python packages, install it using pip if you like pip install yolk Note that these packages (pip, virtualenv, yolk) are installed in your global Python. I recommend to not install any more packages to the global installation as virtualenv enables use to install all packages we need into the virtualenv Python lib. navigate to your recently create mod_wsgi webapp, there should be 2 folders, "apache2" and "htdocs" … -
Django with virtualenv on Webfaction
I really like the Django web framework and I like virtualenv enabling me to use different python configs and packages for different projects. And I have to say I like Webfaction, so easy, so good! (No, I don't get paid by them) This is a quick guide on how to setup Django in virtualenv using mod_wsgi with a Webfaction account. Create an "mod_wsgi" application and create a website to use this application connect to your accounts shell using ssh enable Python 2.6.x as default Python interpreter (as written in the Webfaction documentation) echo "alias python=python2.6" >> ~/.bash_profile source ~/.bash_profile python -V install "pip" and "virtualenv" (be sure to use easy_install-2.6 to use the setuptools of Python 2.6.x): easy_install-2.6 -U pip easy_install-2.6 -U virtualenv I like yolk, that enables you to list the installed Python packages, install it using pip if you like pip install yolk Note that these packages (pip, virtualenv, yolk) are installed in your global Python. I recommend to not install any more packages to the global installation as virtualenv enables use to install all packages we need into the virtualenv Python lib. navigate to your recently create mod_wsgi webapp, there should be 2 folders, "apache2" and "htdocs" … -
Livro Python e Django – Resenha
Finalizei a leitura do livro Python e Django — Desenvolvimento ágil de aplicações web, escrito pelo Osvaldo Santana. Estamos carentes de bons livros sobre Python e Django em português e o Osvaldo soube preencher bem essa lacuna com um material de excelente qualidade, tanto para aqueles que querem aprender quanto para quem já trabalha com Python e Django. Recebi o livro a algumas semanas, mas fiz questão de ler com bastante atenção antes de escrever essa resenha. Para quem está procurando um ótimo material em português, o livro começa explicando o básico de Python, funções, bultins, módulos, classes e orientação a objetos. As explicações de cada item são curtas e recheadas de exemplos, ideal para quem não quer perder tempo com muita teoria e quer aprender na prática, mas com as explicações teóricas na dose certa. A partir do capítulo 5 o livro entra na parte de programação, com exemplos e dicas interessantes. O capítulo 6 explica sobre orientação a objetos, em uma linguagem didática e direta ao ponto. No capítulo 8, o Django é apresentado, assim como uma boa explicação sobre o paradigma MVC. Logo em seguida vem a modelagem de dados, templates, formulários e segurança. Todo conteúdo teórico … -
Introducció a Celery
Introducció a Celery Celery es una aplicació que ens permet crear tasques de feina asíncrones gestionades per un gestor de cues que està basada en l'enviament de missatges de manera distribuïda. Es focalitza en operacions en temps real però també suporta la calendarització de tasques. Les unitats d'execució, anomenades tasques, s'executen de manera concurrent en un o més nodes de treball. Aquestes tasques poden executar-se de manera asíncrona bé de manera síncrona (esperant fins que la tasca està llesta). El sistema de missatgeria recomanat per celery és RabbitMQ encara que és bastant agnòstic en el tema i pot fer servir com a substitut Redis, MongoDB o una base de dades sql. Encara que el programa va sorgir lligat a Django, actualment és una llibreria que es pot utilitzar de manera independent. S'han creat dos projectes a partir de l'original, Celery manté l'estructura bàsica de la llibreria i django-celery manté la integració amb Django. Bé, fins aquí la parrafada d'introducció traduïda amb més o menys fortuna de la documentació de Celery, el que estam dien és que celery ens permet executar tasques de manera distribuïda, on el director d'orquestra (si seguim les recomanacions) és una aplicació anomenada RabbitMQ, escrita en Erlang, … -
django-lastfm
On my old Wordpress blog I had a widget that let me display some of my last.fm stats. Since there was no such widget for Django powered sites (or I didn’t search well enough), I created my own as you can see in the right column. You currently can choose between your recently listened tracks, your weekly artist chart and your top artists. I’ve created a bitbucket project for its further development. So go clone it and give some feedback. PS: I’ll update/write the documentation within the next few days … ;-) -
django-lastfm
On my old Wordpress blog I had a widget that let me display some of my last.fm stats. Since there was no such widget for Django powered sites (or I didn’t search well enough), I created my own as you can see in the right column. You currently can choose between your recently listened tracks, your weekly artist chart and your top artists. I’ve created a bitbucket project for its further development. So go clone it and give some feedback. PS: I’ll update/write the documentation within the next few days … ;-) -
Django-sphinxdoc 0.2 now with documentation!
Just released version 0.2 of django-sphinxdoc. It can now display the documentation itself, the general index and the module index. The source and static views as well as the search functionality is not implemented yet. I’m still pondering whether to use a Google custom search or the Sphinx JavaScript search. Maybe it would be even better if I used Haystack … You can find a quick guide as well as some other guides in django-sphinxdoc’s documentation section (which is of course powered by django-sphinxdoc ;-)). The download can be found at bitbucket.org. -
Django-sphinxdoc 0.2 now with documentation!
Just released version 0.2 of django-sphinxdoc. It can now display the documentation itself, the general index and the module index. The source and static views as well as the search functionality is not implemented yet. I’m still pondering whether to use a Google custom search or the Sphinx JavaScript search. Maybe it would be even better if I used Haystack … You can find a quick guide as well as some other guides in django-sphinxdoc’s documentation section (which is of course powered by django-sphinxdoc ;-)). The download can be found at bitbucket.org. -
django-sphinxdoc 1.0
Most Python projects use Sphinx for their documentation. And many (most?) Python powered websites use Django as framework. So there might be some people who use both Sphinx and Django. If you belong to this group and want to integrate the documentation of your projects into your Django powered website, django-sphinxdoc might be the app you’re searching for. Django-sphinxdoc can build and import your Sphinxdocumentation and provides views for browsing and searching it. You can see django-sphinxdoc in action be reading its documentation. What’s new in this version? You can now search the documentation (via Haystack). New management command updatedoc for importing and building JSON files from your documentation and updating Haystack’s search index. New model Document for JSON files. Renamed the App model to Project What’s planned for the future? Allow users to comment the documentation. You can find django-sphinxdoc in the Cheese Shop or at Bitbucket. -
django-lastfm 1.0
Django-lastfm is a small Django app that allows you to embed your charts or recently listened tracks from Last.fm into your website. You can see the widget in action in the sidebar of this website. I raised its version to 1.0 since there have been no problems for a long time and there are also no features I want to include. You can find django-lastfm in the Cheese Shop or at Bitbucket. -
django-lastfm 1.0
Django-lastfm is a small Django app that allows you to embed your charts or recently listened tracks from Last.fm into your website. You can see the widget in action in the sidebar of this website. I raised its version to 1.0 since there have been no problems for a long time and there are also no features I want to include. You can find django-lastfm in the Cheese Shop or at Bitbucket. -
Préparez un solide alibi, parce que nous savons que vous avez un mobile, un django-mobile
J'ai déjà fait un billet parlant d'une app de monsieur gregmuellegger, à savoir celui sur les websockets. Mais le monsieur étant prolifique, je me vois 'obligé' d'écrire à nouveau sur une de ses apps, à savoir django-mobile. 1- Où on le trouve, comment on l’installe, tout ça quoi (et la doc) ? Alors on trouve django-mobile à ... -
Use JSON instead of YAML for Django test fixtures
Today I learned that JSON is much faster than YAML for use in Django fixtures... -
Django-Articles 2.1.1 Released
I've been working on some neat changes to django-articles recently, and I've just released version 2.1.1. The most noticeable feature in this release is Auto-Tagging. Since I feel like I've described the feature fairly well in the README, I'll just copy/paste that section here. The auto-tagging feature allows you to easily apply any of your current tags to your articles. When you save an Article object with auto-tagging enabled for that article, django-articles will go through each of your existing tags to see if the entire word appears anywhere in your article's content. If a match is found, that tag will be added to the article. For example, if you have tags "test" and "art", and you wrote a new auto-tagged Article with the text: This is a test article. django-articles would automatically apply the "test" tag to this article, but not the "art" tag. It will only apply the "art" tag automatically when the actual word "art" appears in the content. Auto-tagging does not remove any tags that are already assigned to an article. This means that you can still add tags the good, old-fashioned way in the Django Admin without losing them. Auto-tagging will only add to an … -
Django-Articles 2.1.1 Released
I've been working on some neat changes to django-articles recently, and I've just released version 2.1.1. The most noticeable feature in this release is Auto-Tagging. Since I feel like I've described the feature fairly well in the README, I'll just copy/paste that section here. The auto-tagging feature allows you to easily apply any of your current tags to your articles. When you save an Article object with auto-tagging enabled for that article, django-articles will go through each of your existing tags to see if the entire word appears anywhere in your article's content. If a match is found, that tag will be added to the article. For example, if you have tags "test" and "art", and you wrote a new auto-tagged Article with the text: This is a test article. django-articles would automatically apply the "test" tag to this article, but not the "art" tag. It will only apply the "art" tag automatically when the actual word "art" appears in the content. Auto-tagging does not remove any tags that are already assigned to an article. This means that you can still add tags the good, old-fashioned way in the Django Admin without losing them. Auto-tagging will only add to an … -
Using Django Authentication with Twisted Perspective Broker
For my third year project, I have hooked Twisted's Perspective Broker authentication into Django, so that a networked application can authenticate itself against Django's central user database (django.contrib.auth). The process is pretty quick and easy, thanks to Twisted's pluggable nature, and Django's pure simplicity. The Checker Firstly, we create a class which will actually do [...] -
Configuration and architecture
This is the second part in my series about building a build farm for Django with Buildbot. Part 1 covered some background, including the specific problems facing a CI system for Django's core development. Starting in this part I'll be looking at the actual code I wrote to solve these problems. It's running now at buildbot.djangoproject.com, and the code's on GitHub. Please feel free to take a look (and fork/reuse if you want) but keep in mind it's very much a work-in-progress. You'll probably notice me updating this stuff a bunch over the next few days/weeks. If you're not already a bit familiar with Buildbot you might have a bit of trouble following what's coming next, particularly because I'm going to deviate quite a bit from the documented way of doing things. If you'd like to learn the "party line" -- and I suggest that you do, since I'm quite possibly doing something a bit insane here -- then I'd suggest either the official documentation (which is quite good, if a bit rough), or the relevant chapters from Jeff Younker's Foundations of Agile Python Development The first think you'll notice if you look at my code is that doesn't look … -
Taming the Komodo dragon for virtualenv and python
My first python editor on osx was textmate. Like many others I love it's simplicity, bundles, and the fact that it actually feels like an osx app and not some OS bastard love child, but after a while I found I really wanted seamless autocomplete and calltips which I'd always had on Windows. Every year I look in vain at the macromates site for textmate 2, and every year I become increasingly -
Configuration and architecture
This is the second part in my series about building a build farm for Django with Buildbot. Part 1 covered some background, including the specific problems facing a CI system for Django’s core development. Starting in this part I’ll be looking at the actual code I wrote to solve these problems. It’s running now at buildbot.djangoproject.com, and the code’s on GitHub. Please feel free to take a look (and fork/reuse if you want) but keep in mind it’s very much a work-in-progress. -
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.