|
Wulfeh posted:checkboxes and newforms. Interestingly I recently wanted to select the available check boxes based on data passed to my view. This isn't that well documented so I thought i'd share my example. forms: code:
views: code:
|
# ¿ May 14, 2008 19:41 |
|
|
# ¿ May 3, 2024 14:52 |
|
nbv4 posted:Does anyone have any experience using django-tagging with django 1.0? Is it stable? or alternatively a tagging system that works well with 1.0? The following bug caused me some pain: http://code.google.com/p/django-tagging/issues/detail?id=160 Also, there are a couple of issues with the parsing of tags if you aren't forcing lowercase tags. All in all its a great library and I'm happily using it with Django 1.0.
|
# ¿ Nov 23, 2008 15:36 |
|
hitze posted:I was wondering if anyone knew how to do a simple for loop that iterates the number it gets from say "bingodingo.number". I've searched djangoproject.com and found a ticket about it. I can't seem to find any documentation on how to make the for loops in django work like that This is more to do with python than with Django its self, in python you are encouraged to loop through all elements of a list (or in Django a query result set) instead of using an iterator (as I'm sure you've found). So first I'd look at avoiding this in some way. However, if you want to perform a loop x times you could use something like the built-in xrange function in your view. Then pass the resulting xrange object to your template. code:
Wedge of Lime fucked around with this message at 23:42 on Feb 18, 2009 |
# ¿ Feb 18, 2009 23:38 |