Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
DjangoSites Gets New Shoes
I launched DjangoSites publicly last June, and since then we've had over 1,250 websites submitted to what has become the ultimate directory of Django-powered websites. The look and feel of the site didn't seem to have the same zing that many of the listed sites had though, so after a quick chat with the ever-creative Martin 'maddiin' Czura he was able to put together a new design that we both think is a great improvement. The new design is already online at DjangoSites.org, with a few nifty changes as well as the colour scheme such as an improved navigation bar and less cluttered positioning of user account options. At the same time, the website has been moved to a new VPS with KnownHost. I've been using KnownHost for over a year now and their VPS hosting is fantastic. The support from them has always been helpful, and their prices are very reasonable for what has been a very reliable service. I updated the TTL for the djangosites.org domain a few weeks back, so by the time this post goes live the new IP address should be accessible to anybody with properly configured DNS servers. I encourage you to do a … -
DjangoSites Gets New Shoes
I launched DjangoSites publicly last June, and since then we've had over 1,250 websites submitted to what has become the ultimate directory of Django-powered websites. The look and feel of the site didn't seem to have the same zing that many of the listed sites had though, so after … -
Habemus Python!!!
Hace poco fue el dia D para python y django puesto que el gran hermano Google lanzó el beta de Google App Engine, un sdk de desarrollo de aplicaciones web powered by python, pues bien el ingeniero Camilo Nova, CEO de Axiacore, me pidió que lo asesorará sobre django, y lo hicé, en cuestion de 1 hora, le mostré el potencial de django y quedó sorprendido, por lo cual dijo que lo iba a pensar y hoy me dio la noticia de que AxiaStore se desarrollará en python, por lo cual puedo decir: Habemus Python!!! -
Django performance testing – a real world example
About a week ago Andrew and I launched a new Django-powered site called Hey! Wall. It’s a social site along the lines of “the wall” on social networks and gives groups of friends a place to leave messages, share photos, videos and links. We wanted to gauge performance and try some server config and code changes to see what steps we could take to improve it. We tested using httperf and doubled performance by making some optimisations. Server and Client The server is a Xen VPS from Slicehost with 256MB RAM running Debian Etch. It is located in the US Midwest. For testing, the client is a Xen VPS from Xtraordinary Hosting, located in the UK. Our normal Internet access is via ADSL which makes it difficult to make enough requests to the server. Using a well-connected VPS as the client means we can really hammer the server. Server spec caveats It’s hard to say exactly what the server specs are. The VPS has 256MB RAM and is hosted with similar VPSes, probably on a quad core server with 16GB RAM. That’s a maximum of 64 VPSes on the physical server, assuming it is full of 256MB slices. If the … -
Queryset-Refactor Merged!
Od dawna rozwijany w osobnym branchu ulepszony ORM został połączony z drzewem głównym. W końcu możemy uaktualniać wiele rekordów w tabeli na raz, czy też korzystać z dziedziczenia modeli. Jedyne niekompatybilność na które natrafiłem, to OneToOneField nie jest teraz domyślnie kluczem... -
Django sites
He estado revisando sitios "powered by django" enhttp://www.djangosites.org y he encontrado http://dpaste.com/ que estacomo el mas alto por votos.pdt: este post fue escrito probando la funcionalidad de blogger de mail2blog -
quicknote
Hace poco me consegui un trabajo donde debo hacerle varios cambios a una aplicacion desarrollada en python con gtk como librera gráfica llamada quicknote, lo interesante del asunto es que corre en un celular nokia 810 que esta muy coqueto, ojala me pudiera comprar uno de estos, tienen un linux propio que es derivado de debian, por lo que tiene repositorios apt y todo eso, algunos paquetes como python ya estan portados a este dispositivo, y dentro de poco daran soporte para qt.Es muy vacano ver como las empresas de dispositivos moviles como nokia, le apuestan a linux y sobretodo a python, otra cosa interesante que alcancé a ver que tiene soporte para pygame, por lo que se pueden desarrollar juegos para este movil.Y tiene ssh!!! el mejor amigo del hombre geek!!! (frase de Santiago Ruano) -
Установка и настройка Django на "боевом" сервере с CentOS 5
Я делаю на Django Энциклопедию языков программирования. За время работы сайта выяснилось, что нужен свой выделенный сервер для большей производительности и стабильности. Пока что взял дешевый сервер с 1.8 ГГц процессором и 512 Мб памяти. В этой статье я расскажу об установке и настройке на этом сервере Django с mod_python для Apache, с кэшированием memcached и lighttpd для статических файлов. Итак, у нас есть свежеустановленная CentOS 5 и желание хостить сайт на Django (или несколько сайтов). Что для этого надо установить? Собственно Django MySQL-python mod_python memcached lighttpd Все шаги, кроме установки самого Django, — необязательные (например, можно использовать Django с fcgi вместо mod_python и PostgreSQL или другую СУБД вместо MySQL), но шаги 1-3 – то, что вы скорее всего будете использовать, а 4-5 – для повышения производительности. Статья, в основном, CentOS-ориентированная, но в определенной степени подойдет и для других дистрибутивов Linux. Замечание по безопасности: так как это свежеустановленная система, я не боюсь сломать что-то уже работающее, так что могу работать под правами root. Но лучше, конечно, работать под правами непривилегированного пользователя, и использовать “sudo” для команд, требующих административные привилегии. Ну, начнем. Собственно Django В большинстве случаев стоит устанавливать самую свежую svn-версию Django, а не “релиз”. На сегодняшний момент, “официальный релиз” слишком устарел, и в нем отсутствует множество полезных возможностей … -
Introducing django-ae-utils
Recently I’ve started to play around with using Django on Google’s new App Engine. As mentioned by many others at this point, Django technically runs on App Engine but there are significant parts which do not. Accordingly I’ve started to write some code to replace or supplement the holes left in Django by App Engine. [...] -
Google App Engine on Win2K (using django-yui-layout-templates)
Update : September 1, 2008 I guess Googs finally caught on as their 1.1.2 installer works on Win2K! FTW! Update After finally getting time to play around with the Google App Engine Django helpers, here’s a few more steps to integrate nicely with the helper suite. Move the appengine installation from C:\AppEngine\ to where the Windows installer would have installed it to: C:\Program Files\Google\google_appengine (make sure to clean up your .pyc files) Add the following to your PYTHONPATH system variable: %APPENGINE%\;%APPENGINE%\lib;%APPENGINE%\lib\yaml\lib;%APPENGINE%\lib\webob; After following the instructions, you should be good to go with Django + AppEngine! FTW! Whee. So I finally get an hour or so to play around with the Googs App Engine and luckily for me, all my machines decided to puke except for my Windows 2000 Server. How ironic is that? In disbelief, I downloaded the Google App Engine SDK Windows installer and what do I get? I sense some pure, unadultered haterade. (j/k) Since Python is one of those insert_any_synonym_for_fun languages that just works, here’s how to get the Google App Engine SDK working in Win2K. Download the Linux/Other platform package and unzip to somewhere neat. Add a System Environment variable called ‘APP_ENGINE_HOME’ that points to your … -
DjangoSites Gets OpenID Support
OpenID is, in my opinion, critical in the success of an open web. It allows an individual to access websites without providing that website with a password, and it provides a single identity across non-homogeneous websites. Generally speaking, it also makes the signup process for a website much simpler. Rather than the traditional method of finding a username that isn't yet in use, entering a password, verifying your e-mail address, then selling your firstborn, with a system such as OpenID you simply enter your OpenID Identifier (typically, but not necessarily the web address of your weblog) and click 'Signup'. You then verify your username and password with your OpenID Provider (the only username & password you should have to remember) who returns you to the original website with a token saying "Yep, this really is the guy who says he's rossp.org." There are plenty of descriptions of OpenID works, so I won't harp on about it too long. Lets just say that I think it's an important development in todays web. Django got it's first dose of the OpenID 'syrup' from Simon Willison, who released his efforts as django_openidconsumer. This application lets you use OpenID on your website, however it … -
DjangoSites Gets OpenID Support
OpenID is, in my opinion, critical in the success of an open web. It allows an individual to access websites without providing that website with a password, and it provides a single identity across non-homogeneous websites. Generally speaking, it also makes the signup process for a website much simpler. Rather … -
Django geography hacks
If you need to handle some basic geography in your Django application, but can't or don't want to use GeoDjango, here are some quick hacks to accomplish simple geocoding and distance calculations. -
Localization options in Django
Was having trouble finding the language abbreviations everyone was using with localization. Apparently it’s a standard: ISO 639-1 Also when setting up localization you need to create a ‘locale’ folder. The location is your choice. Then add one by one the locales from the same level as where your locale folder is. So if ‘locale’ [...] -
History lesson
This has been going around -- give people a peek at what commands you run most often. I ran this on my server, where I spend most of my shell time: > history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s\n",a[i],i}}'|sort -rn|head 103 hg 81 cd 67 ll 29 ./manage.py 23 ab 21 re-ap 17 hgup 14 svn 13 cat 12 ls Notes: Mercurial has pushed my use of Subversion way down. I can't remember what I was benchmarking with ab, but I'm sure it's faster now! re-ap is my alias for restarting Apache (re-po restarts Postfix, re-my restarts MySQL, etc.). hgup is a simple shell script that updates the live instance of my site by fetching from the Mercurial repository in the staging instance. It would make a neat Django custom management command, but not one tied to a particular app. -
Function/Class '...' was not prepended with 'user_'
I'm currently configuring one of my extension for realurl within Typo3. My aim is to have the categories and subcategories of an article center within the url. But the functionality of lookUpTable does not suffice as I have to observe the nesting of the categories. So I choose userFunc and enter the values as given in the realurl documentation: 'fixedPostVars' => array( 'articlecenter' => array( 'userFunc' => 'EXT:extkey/class.tx_userxyz.php: &tx_realurl_userfunctest->main', ), ), then I clear the cache and it happens... nothing. Only a nice error message is presented: |Function/Class 'E' was not prepended with 'user_'| Seems that my configured values do not really reach the code they should. And of course that's the way it is. After some searching I detect that my configuration is wrong, because realurl is putting all configured values into a nested array wherein every key-value pair is put in as an array that has a numeric indice in the big array. (I hope you can follow my poor english). But my "userFunc" is not set up this way, its numeric indice is userFunc and the array with the key-value pairs is the string EXT:realurl/class.tx_realurl_userfunctest.php:&tx_realurl_userfunctest->main. As realurl runs through this array using foreach it has only "E" … -
Function/Class '...' was not prepended with 'user_'
I'm currently configuring one of my extension for realurl within Typo3. My aim is to have the categories and subcategories of an article center within the url. But the functionality of lookUpTable does not suffice as I have to observe the nesting of the categories. So I choose userFunc and enter the values as given in the realurl documentation: 'fixedPostVars' => array( 'articlecenter' => array( 'userFunc' => 'EXT:extkey/class.tx_userxyz.php: &tx_realurl_userfunctest->main', ), ), then I clear the cache and it happens... nothing. Only a nice error message is presented: |Function/Class 'E' was not prepended with 'user_'| Seems that my configured values do not really reach the code they should. And of course that's the way it is. After some searching I detect that my configuration is wrong, because realurl is putting all configured values into a nested array wherein every key-value pair is put in as an array that has a numeric indice in the big array. (I hope you can follow my poor english). But my "userFunc" is not set up this way, its numeric indice is userFunc and the array with the key-value pairs is the string EXT:realurl/class.tx_realurl_userfunctest.php:&tx_realurl_userfunctest->main. As realurl runs through this array using foreach it has only "E" … -
Function/Class '...' was not prepended with 'user_'
I'm currently configuring one of my extension for realurl within Typo3. My aim is to have the categories and subcategories of an article center within the url. But the functionality of lookUpTable does not suffice as I have to observe the nesting of the categories. So I choose userFunc and enter the values as given in the realurl documentation: 'fixedPostVars' => array( 'articlecenter' => array( 'userFunc' => 'EXT:extkey/class.tx_userxyz.php: &tx_realurl_userfunctest->main', ), ), then I clear the cache and it happens... nothing. Only a nice error message is presented: |Function/Class 'E' was not prepended with 'user_'| Seems that my configured values do not really reach the code they should. And of course that's the way it is. After some searching I detect that my configuration is wrong, because realurl is putting all configured values into a nested array wherein every key-value pair is put in as an array that has a numeric indice in the big array. (I hope you can follow my poor english). But my "userFunc" is not set up this way, its numeric indice is userFunc and the array with the key-value pairs is the string EXT:realurl/class.tx_realurl_userfunctest.php:&tx_realurl_userfunctest->main. As realurl runs through this array using foreach it has only "E" … -
Keeping ContentTypes and Permissions Updated without syncdb
In managing releases to a production django project, I find myself using python manage.py sqlall APPNAME to put the sql needed in a script for any new models, and then writing the ALTER or DROP statements by hand to also go into the sql scripts. One thing that not running syncdb on production leaves out are the creation of the content type and permission records (if using django.contrib.auth and django.contrib.contenttypes). It was recommended to me on #django that I look at each of these apps management.py module to see where they hook into the post_syncdb signal. In doing so I discovered some methods that I could just call from python and keep both my permissions and content types up to date: from django.core.management import setup_environ try: import settings except ImportError: import sys sys.stderr.write("Couldn't find the settings.py module.") sys.exit(1) setup_environ(settings) # Add any missing content types from django.contrib.contenttypes.management \ import create_all_contenttypes create_all_contenttypes() # Add any missing permissions from django.contrib.auth.management import create_permissions from django.db.models import get_apps for app in get_apps(): create_permissions(app, None, 2) Enjoy. -
Keeping ContentTypes and Permissions Updated without syncdb
In managing releases to a production django project, I find myself using python manage.py sqlall APPNAME to put the sql needed in a script for any new models, and then writing the ALTER or DROP statements by hand to also go into the sql scripts. One thing that not running syncdb on production leaves out are the creation of the content type and permission records (if using django.contrib.auth and django.contrib.contenttypes). It was recommended to me on #django that I look at each of these apps management.py module to see where they hook into the post_syncdb signal. In doing so I discovered some methods that I could just call from python and keep both my permissions and content types up to date: from django.core.management import setup_environ try: import settings except ImportError: import sys sys.stderr.write("Couldn't find the settings.py module.") sys.exit(1) setup_environ(settings) # Add any missing content types from django.contrib.contenttypes.management \ import create_all_contenttypes create_all_contenttypes() # Add any missing permissions from django.contrib.auth.management import create_permissions from django.db.models import get_apps for app in get_apps(): create_permissions(app, None, 2) Enjoy. -
Przesiadka na Google App Engine
Dwa wieczory zajęło nam przeportowanie średniej wielkości aplikacji napisanej w Django na Google App Engine (GAE). Możecie ją zobaczyć pod adresem: http://mines.appspot.com Jest to internetowa wersja starej dobrej gry saper. Pierwsza wersja napisana została rok temu, jednak teraz... -
Weblog Updates
My previous blog was my first ever Django application. It worked well, but it was beginning to feel a little clumsy. For example, I had to write posts in HTML. Markdown would be much nicer. I also had separate applications to syndicate links, blog posts, photos, and more. It all felt like a bit of a dogs breakfast. So, inspired by Jacob Kaplan-Moss' jellyroll, and other 'all in one' blog solutions I've seen lately, I've built a somewhat-complete tumblog system in Django. It lets me syndicate links from Magnolia, my blog posts, selected quotes, and soon, photos. Tags are shared across the board, and there is no real separation of content types to the end user. The nice part from my point of view is that I can link to websites I find in my travels, adding commentary, without writing a whole blog post. It can also let me use the neat Magnolia bookmarklets to add links nice and quickly. Lastly, I've published a more minimalist design and removed blog comments. Right now, I'm not one to write provocative blog posts that stir great discussion, so I doubt they'll really be missed. Any comments or thanks can be e-mailed to … -
Weblog Updates
My previous blog was my first ever Django application. It worked well, but it was beginning to feel a little clumsy. For example, I had to write posts in HTML. Markdown would be much nicer. I also had separate applications to syndicate links, blog posts, photos, and more. It all … -
Google App Engine
Dziś w internecie zagrzmiało. Wczoraj Google ogłosiło coś, co nazywa sie Google App Engine. Nie pisał bym o tym tutaj, gdyby nie fakt, że dotyczy to również Django. Google udostępniło platformę do tworzenia aplikacji webowych. Dzięki Google App Engine możemy własne serwisy internetowe... -
Google App Engine: the first look
Yesterday Google announced its new offering: Google App Engine. These are my random notes I did yesterday when I studied the new service.Google didn't go the same way as Amazon with its AWS. The former offers a form of shared hosting (think "distributed WebFaction"), while the latter offers a virtualized environment (think "distributed SliceHost"). So basically we are talking about more high-level approach to web applications, which is easy even for novices. On the other hand AWS is more flexible and more enterprise-y.In order to scale, you have to virtualize. In order to virtualize, some actions should be restricted. Google App Engine provides a sandbox on the language level. Only one language is supported at the moment: Python. And guess what? Django is everywhere! For virtualization reasons only the pure Python is supported and a subset of the Python standard library. You can bundle any pure Python modules with your application. Three third-party libraries are available out-of-the-box: Django 0.96.1, WebOb 0.9, and PyYAML 3.05. But fret not, you can bundle a framework of your choice with your application and run it too, even a custom version of Django — basically anything that supports WSGI. I suspect that other mature Python …