|Google-translated page (from German)|
|English version of text by page author|
rapidsms-admin.pydoes not work anymore, at least for creating new projects. Go to the RapidSMS documentation site and read the installation instructions. Yes, I know: the documentation on setting up a new project shouldn't be under installation instructions, but we live in an imperfect world. Oh, and you'll need Django 1.4 or greater.
>>> # a rather contrived example, but please bear with me >>> mylist = ['a', 1, 'I', 'b', 2, 'II', 'c', 3, 'III']
>>> mylist[::3] # starting with the first element, pick every third element
['a', 'b', 'c']
[1, 2, 3]
['I', 'II', 'III']
ListViewfor my project, but I kept getting an empty page, even after I confirmed that I had data in my database. Of course, when you have to communicate progress, an empty page isn't terribly convincing that you're not just sitting on your behind. After going back and forth with it, I decided to ask in #django on Freenode, and it was confirmed my code and template had correct code. After some more kicking stuff back and forth, it turned out that even though I had set the
context_object_nameon the class, Django was still going with the default,
object_list. So if you set up a
ListViewand things aren't working as they should, this may save you a couple of head-scratching moments.
LANGis not set, which causes creating a superuser with the management script to blow up. There are a couple of fixes:
local_settings.pyfile. So, by way of helping someone else, and in order to remember, I add these lines to my
import os os.environ['LANG'] = 'en_US.UTF-8'