Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Atualizando projetos para Django 1.0
Fiquei bastante sumido durante as duas últimas semanas. Estou me dedicando em adaptar alguns projetos para o Django 1.0, versão muito esperada que foi lançada recentemente. Por serem projetos de produção, optei por sempre respeitar e seguir as versões estáveis do Django, mesmo sabendo que existe um comprometimento grande por parte dos desenvolvedores em relação a estabilidade e segurança das versões em SVN. Em laboratório, mantenho as duas versões (a estável e a SVN, utilizada para testar novas features e avaliar as melhorias). O bom de fazer essa atualização de código é aproveitar a oportunidade e colocar em prática um ‘code refactoring‘, otimizando as aplicações e aproveitando a oportunidade para corrigir bugs e padronizar diversas funções. O Django 1.0 tem várias novidades e muda muita coisa em relação ao 0.96, por isso nem sempre um código feito para a versão 0.96 vai funcionar de primeira na 1.0, mas a adaptação vale a pena, pois a nova versão está sensacional. Como eu já estava acompanhando as evoluções através do SVN, a migração não está sendo difícil porque já sei tudo que mudou, mas no meu caso é demorada porque diversos pontos das aplicações que mantenho são complexas e dependem de outras … -
Japanese books about Django and Python
When looking for English books in a bookstore i came across the programming section of the 8 story book store and i could not resist to take a look and see if i could find any Python or Django books there. Look at my picture from what i've found here: http://trbs.net/photos/python-django-books-in-japanese/ Regretfully these where only about two bookshelves worth of Python books. Compare that too one full cabinet of Ruby and Rails books, one cabinet for Perl, a hole alley of Java books, an alley for c and c++ and lastly an alley for php/asp/vb/c# and other some other languages. *I'd even found some scheme, lisp and cobolt books in there :) * Worthy to note was that the Microsoft languages section was far less in total then i'd expected. While on the other hand a relatively minor language like Ruby had far more. Ofcourse japan is the homeland of Ruby so that might explain it's high number of books ;) (On a site note; probably the only people that could have invented such a syntax horrible language are the Japanese. Of-course I'm purposely forgetting about Perl here) Anyways i did not want to withhold u guys of these pictures, … -
django, nginx, memcached – the dynamic trio
Inspired by this article I decided to find out if the same technique can be exploited in my current project which is developed in django. My first problem was to come up with a viable cache key scheme since simply using the full request URI as suggested in the article wouldn’t work for me because my site renders a different version of a navigation menu depending on the authentication state of current the user. After weighing in the advantages and disadvantages between the super clean variant of factoring the session cookie and all other cookies into the memcached key and a less heavy weight method that would only append a server supplied abstract “page version” field to the request URI, I went for the latter. My resulting nginx virtual host config was looking like this: ?View Code APACHE1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 # define application servers upstream backend { server 127.0.0.1:8080 weight=1; } server { listen 80; server_name domain.com; access_log /var/log/nginx/domain.com.log; location … -
Oddaj swój głos na Django!
Równo tydzień temu odbył się konkurs na napisanie najlepszej aplikacji w 24h. W konkurencji wzięło udział 15 drużyn. Było dostępnych wiele technologii, od PHP (i jego frameworków takich jak CakePHP), poprzez Javę i Ruby on Rails. Można było również korzystać z Django. Taki konkurs... -
Make “easy_install PIL” work
Make “easy_install PIL” work -
Django cheat sheet
With the release of Django 1.0, we have released a completely updated version of our highly popular cheat sheet. -
Wapi 0.2.1 and django-oauthsp 0.2 released
I've finally managed to solve all known issues in django-oauthsp, so it's time to release 0.2. Wapi 0.2.1 is also here, fixing a small bug in the JSON formatter and updated to match a small API change in django-oauthsp. wapi-0.2.1.zip django-oauthsp-0.2.zip -
Dojo namespacing with dojango
This article describes, how you can create your own dojo namespace within a reusable django application when using dojango. It should give you an idea, where you place your javascript files and how you could structure your dojo namespace directory. When using dojango, where you are able to switch the source of dojo (a remote CDN or a local version), there are several things to consider when creating your own namespace. First I’ll explain how dojo uses namespaces and how you can preload files with it and afterwards i’ll describe how you setup a django project using dojango and adding your own django app with its own dojo namespace. Explaining the Dojo Loader It is important to understand, how dojo loads files and how dojo utilizes their namespace structure before creating your own one. At the beginning there is the dojo base system, that is loaded via a script tag in your page and which enables the dojo namespace on your page: 1234<script type="text/javascript" src="/path-to-dojo-dir/dojo/dojo.js" djConfig="parseOnLoad: true, isDebug: false"> </script> As you maybe already know, dojo comes with the two other namespaces dijit (layout and form widgets) and dojox (extensions for dojo and experimental stuff) and … -
Blog refresh
As you may or may not have noticed, I've refreshed my blog. It now runs on Django 1.0 and has a simpler layout. In the process I've managed to break my feeds, resulting in giving everyone doubly-escaped content. Sorry about that! Of course, the layout is horribly broken in IE7 (I can't even imagine what IE6 looks like!). I'll probably fix it at some point, but it's not a priority... Please let me know if you find broken links or things that don't make sense! Comments -
clean_pyc and compile_pyc in Django-extensions
I recently added two new commands to the django-extensions project. clean_pyc, removes all compiled python bytecode files from your project directory compile_pyc, compiles all python files to bytecode files in your project directory These are handy shortcuts to what you would normally do with something like "$ find -name "*.py[co]" -delete" or python's compileall import. The main added advantage is a little piece of code that checks the correct working directory. So it will only compile or delete files in your project root, even if you call manage.py from somewhere else. One other thing to note is that you will always see files being deleted when you call "$ ./manage.py clean_pyc -v" this is because when manage.py gets loaded python will compile files in your project root which are then in turn deleted by the command ;-) Check it out at: http://code.google.com/p/django-command-extensions/ -
Shifting Bits: Another Django Blog Engine
Tonight I released/open-sourced ShiftingBits. This blog is still on WordPress, but I believe I am close to having the all the features I need/require to make the migration possible. I pretty much stole a bunch from Brian Rosner's oebfare code base so if any of it looks familiar, that's where I copied a lot of this from. Thanks, Brian! If you are wanting to move from a WordPress blog to your own Django-based site, you might be able to save some time with this blog engine. This is exactly the path I am taking. I am using: mootools 1.2 -- JavaScript library awesomeness blueprint -- CSS framework wmd -- Live markdown preview for comments prettify -- Really cool syntax highlighter Feature Summary: Basic blog post mode driven using generic date based views with redirects so that the WordPress url date format (numbered month versus the prettier and django default of short month name) get mapped properly so that none of your links break. WordPress to Django Migration Script Tagging via django-tagging Comments via the new django.contrib.comments and using the live markdown preview editor, wmd. Full RSS feeds (both latest feeds and by tag) Left to To: Implement an XML-RPC interface … -
Shifting Bits: Another Django Blog Engine
Tonight I released/open-sourced ShiftingBits. This blog is still on WordPress, but I believe I am close to having the all the features I need/require to make the migration possible. I pretty much stole a bunch from Brian Rosner's oebfare code base so if any of it looks familiar, that's where I copied a lot of this from. Thanks, Brian! If you are wanting to move from a WordPress blog to your own Django-based site, you might be able to save some time with this blog engine. This is exactly the path I am taking. I am using: mootools 1.2 -- JavaScript library awesomeness blueprint -- CSS framework wmd -- Live markdown preview for comments prettify -- Really cool syntax highlighter Feature Summary: Basic blog post mode driven using generic date based views with redirects so that the WordPress url date format (numbered month versus the prettier and django default of short month name) get mapped properly so that none of your links break. WordPress to Django Migration Script Tagging via django-tagging Comments via the new django.contrib.comments and using the live markdown preview editor, wmd. Full RSS feeds (both latest feeds and by tag) Left to To: Implement an XML-RPC interface … -
6. Templates for the Weblog
Writing the Link Model This is part 6 of a series of posts on James Bennett's excellent Practical Django Projects. The table of contents and explanation can be found here. Read through and implement the all the templates up to p111 where the book covers Custom Tags. If you try running your base site at http://localhost:8000/weblog/ you'll probably get some template errors so we need to go back -
Django 1.0 Released
Congratulations everybody Django 1.0 has landed Thanks for all the hard work of the Django core team !!! -
Django Release Party in Helsinki
Heads up [Finnish Djangonauts](http://djangopeople.net/fi/)! Join us for celebrating the Django 1.0 release at Kaapelitehdas, Helsinki tomorrow evening (Saturday 6th) starting at 5 pm. More information on the location and attendees can be found on the [event wiki page](http://code.djangoproject.com/wiki/VersionOneReleasePartyHelsinki). This is an open invite -- everyone is welcome! See you there! :) -
Django 1.0
Jak już zapewne wszystkim wiadomo, zostało wydane Django 1.0. Wiedziałem, że chłopakom się uda :). Ostatnio powstało kilka niekompatybilnych wstecz zmian, jednakże w żaden sposób one mnie nie dotknęły. Pełną listę niekompatybilnych zmian możecie zobaczyć na... -
Quick Django Trick
Recently while playing around with a Django model in the always awesome iPython shell I discoved a neat feature of the Django ORM. It’s basically a way to get the id of a related object without actually triggering a query to get all of the related object’s data. Frequently when working with a model which [...] -
Django 1.0
Congratulations to the entire development team and Django community for making the Django 1.0 release today! It’s a monumental accomplishment, and I’m very pleased to see it here. I’m not as active in the community these days, but I’m still … Continue reading → -
Django 1.0 was released
Finally, Django reaches 1.0 status. If you have been using 0.96.x, it will be quite a bit of work to upgrade your apps, but it’s worth the effort. According to the release notes: Since Django 0.96, we’ve made over 4,000 code commits, fixed more than 2,000 bugs, and edited, added, or removed around 350,000 lines [...] -
Django 1.0 is Out
Jacob Kaplan-Moss announced the release of Django 1.0. That’s a great milestone for this Python Web framework. Jacob recalls how the project grew to a proportion that they couldn’t imagine in the first days, and concludes that “Django 1.0 represents a the largest milestone in Django’s development to date: a web framework that a group of [...] -
Django 1.0 released!
Yes, is finally here. -
Django 1.0 released!
Yes, is finally here. -
A Note on Python Paths
This time I decided to share some knowledge about Python paths which seemed a little bit confusing to me in the beginning of diving into Python. I am working with Django in different platforms like Mac OS X, Windows, and Linux, therefore the common patterns how to activate new python modules in all of those environments should be familiar to me.Python modules are either *.py files or directories containing __init__.py. When defining paths to python modules, you will usually need to deal with the latter ones. A module is meant to be under python path if you can run python and import that module.For example, if you can run the following, then django is under your python path.python>>> import djangoStay tuned to get deeper into python paths.Installing modulesIf a module is installable, usually all you need to do is to extract its setup directory, cd to it, and runpython setup.py installThis will copy the module into the site-packages directory of the current python installation. It might be that you have multiple Python versions on your computer. According to django documentation, you can find the currently used site-packages bypython -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"Or you can use PEAK EasyInstall … -
Django Blog in the Works
I am previously stated my desire about rebuilding Shifting Bits into a Django-based blog, but it has been really slow going due to other time commitments. Over the weekend, I started cutting out a fresh new template and a migration script to get my data export from WordPress into my Post model (borrowing heavily from Brian Rosner's oebfare -- why invent when you can steal). Here is a preview of what is to come, hopefully sooner rather than later: -
Django Blog in the Works
I am previously stated my desire about rebuilding Shifting Bits into a Django-based blog, but it has been really slow going due to other time commitments. Over the weekend, I started cutting out a fresh new template and a migration script to get my data export from WordPress into my Post model (borrowing heavily from Brian Rosner's oebfare -- why invent when you can steal). Here is a preview of what is to come, hopefully sooner rather than later: