Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
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: -
Initial DB data
Within your application on the same level as your models place a folder named “fixtures” In my current setup that means “app/models/fixtures/”, but in a normal setup that would be “app/fixtures/” Within that file all you need to do is add a file with the extension “xml” or “json”. The syntax looks a lot nicer for “json”: [ { "model": "app_name.model_name", "pk": 1, "fields": { "name": "A", "value": 5 } }, { "model": "app_name.model_name", "pk": 3, "fields": { "name": "C", "value": 15 } } ] When you’re all set with your data all you need to do is run “python manage.py loaddata json_filename” (leaving off the “json” extension) -
Liberada a versão do Django candidata à 1.0!
Saiu a versão candidata à 1.0 do Django! Agora acredito que só serão aceitos correções de defeitos, atualizações de tradução e documentação. Existe ainda um ticket (#8796) da django-l10n-portuguese, no roadmap da 1.0, para a atualização do arquivo POT de localização. Falta apenas 10 strings a serem traduzidas, revisões e uma tarefa sugerida pelo Luciano Ramalho que pode ser encontrada na discussão http://groups.google.com/group/django-l10n-portuguese/browse_thread/thread/8c1c0460d19ccc27. Quem se interessar, envie suas sugestões para a lista de localização ou fique à vontade em anexar seus patchs no ticket #8796. Confira também as notas de lançamento da versão candidata à 1.0. Note que ela ainda não é a versão definitiva e não é recomendada para o uso em produção, porém creio que não haverá nenhum incidente que atrasará seu lançamento. -
E-commerce y django
Pues he estado revisando mi correo, particularmente la etiqueta de django-es, y alguna persona preguntaba por como hacer comercio electrónico con django, y le recomendaron la pagina http://www.satchmoproject.com/ esta el código con licencia bsd y algunos ejemplos de paginas donde la usan, e increíblemente (solo para mi) lo usan en la tienda de la Free Software Foundation en http://shop.fsf.org/, en mi incredulidad debia comprobarlo y lo primero que se me ocurrió fue ir a http://shop.fsf.org/admin y efectivamente allí estaba, la interfaz administrativa de django. -
Django 1.0 Release Imminent
If all goes well today then Django 1.0 should be with us soon! This is an exciting time for the fantastic framework. I look forward to seeing code stability and allowing myself to stop running from the latest SVN dev version! Well done to everybody involved! :) I'm also happy to hear that the Django team is throwing me a party on my birthday the 6th of September! It's a shame I can't go, but anybody closer to Silicon Valley should go along. edit Django 1.0, It's in the wild! -
Palestra Django na Impacta
Participei hoje do SP Python Day, evento organizado pelo Fórum Impacta de Tecnologia da Informação, realizado nas dependências da Faculdade Impacta. A galera participou em peso, lotando 3 auditórios da faculdade (um principal com os palestrantes e outros dois com transmissão simultânea). Foi muito bom reencontrar os amigos e ver o grande interesse do público [...] -
Django Group in Nashville
I was pretty pumped to get the invite from Trey Piepmeier tonight about trying to start a local (Nashville, TN) Django meetup/group. If you are in the area, head on over and sign up! -
Django Group in Nashville
I was pretty pumped to get the invite from Trey Piepmeier tonight about trying to start a local (Nashville, TN) Django meetup/group. If you are in the area, head on over and sign up! -
Portuguese translation of Django 1.0
I've just submitted a patch for the Portuguese translation. If you are a Django user and know Portuguese, please take a look to the translation strings and submit any fix before the final 1.0 release. Meanwhile, you can download the unofficial version in the downloads section. Update: The patch is already in SVN. -
Portuguese translation of Django 1.0
I've just submitted a patch for the Portuguese translation. If you are a Django user and know Portuguese, please take a look to the translation strings and submit any fix before the final 1.0 release. Meanwhile, you can download the unofficial version in the downloads section. Update: The patch is already in SVN. -
Postback: Why I choose AGPLv3 for my code
It's been a few days since I posted my decision to release all my code related to Django under the AGPLv3 license. It generated quite a few reactions I didn't expect, so let me tell you the full story. It all started when I needed to support, let's call it technology X - which is pretty hot right now -, in byNotes. I first searched if someone had done it and I found there was a generic and abstract Python implementation, but it needed a lot of work to be adapted to Django. So I decided to build my own solution from scratch. The same day I released the first version, I found an announcement posted the previous day from another developer who had also coded technology X support for Django. It's a pity when that happens, since one of us could have spent that time implementing technology Y. However, it's difficult to avoid those situations, so we must live with it. The bad thing (TM) happened a few days later, when I was chatting with a friend on freenode. I told him I've written support for technology X and it could be useful for a project he's working on. … -
Wapi 0.2 released
I've just finished preparing the Wapi code for the 0.2 release, so you can now download it. oauthsp will be ready in a few days (probably this weekend). -
Code bloat in your Django projects: Models
My current project’s getting a bit large, so I figured I should start subdividing the code a bit. The project’s already split up into multiple applications, but my main application is growing… The first thing I’ve done is split up my models.py into multiple files and moved them into a folder named models. Folder structure is: project/application/models/model_file.py All that’s left to be done is to add an _init_.py to that folder and import all your models within the __init__.py. You’ll also need to make sure the app_label set on each of your models. For example: class Shape(models.Model): value = models.CharField () class Meta: app_label = "my_project" This may turn into a series…lets see if there’s anything else that needs better organization. -
Django testing for absolute beginners
I want to interrupt my series of posts on Practical Django Projects and quickly show how to setup the most basic of tests, and hopefully convince you why taking some small steps and starting with one line of test code can save your sanity especially if you're tracking a code breaking trunk. First the why.. In my previous post I wrote about getting an error in the browser: ImproperlyConfigured -
URLsafe base64 encoding/decoding in two lines
Simon has recently featured this snippet which shrinks a SHA1 hash from 40 to 27 characters using base65 encoding. I've been using another approach for some time and, modestly, I think mine is better, so let me tell you how I do it before you start using the suboptimal approach. Python does it for us First, the base64 module already provides a pair of functions, aptly named urlsafe_b64encode and urlsafe_b64decode, which do quasi-safe url encoding using base64. For example: >>> base64.urlsafe_b64encode(sha1('foobar').digest()) 'iEPX-SQWIR3p67lj_0zigSWTKHg=' The problem here is the equal sign, since we can't put it safely in a URL. However, since we are using this to store a hash and we're going to generate the hash again when we verify the data, we can encode the hash again instead of decoding the base64-encoded string, which lets us safely remove the equal sign. Furthermore, we are also using 27 characters, the same as the other more complex implementation. Can we decode it? Sure! Sometimes, you'll want to decode the base64 encoded data. However, once we remove the equal sign, we can't no longer pass the base64 encoded string to urlsafe_b64decode: >>> base64.urlsafe_b64decode('iEPX-SQWIR3p67lj_0zigSWTKHg') Traceback (most recent call last): File "<stdin>", line 1, in …