Re: how to render context like this :

2011-08-31 Thread kele
thansk Evans , it worked . =) On Aug 31, 6:48 pm, Tom Evans <tevans...@googlemail.com> wrote: > On Wed, Aug 31, 2011 at 11:40 AM, kele <gisx...@gmail.com> wrote: > > > c = Context( {'teams': > >                 {1: ['a', 'b'] , 2:['c', 'd']} >

how to render context like this :

2011-08-31 Thread kele
c = Context( {'teams': {1: ['a', 'b'] , 2:['c', 'd']} } ) i have try like this : {% for k in teams %} {{k}} {{k.0}}# also try teams[k] ... etc. but also dosent work {% endfor %} sorry for my noob question , but pls show me how to to this

django query API help

2008-11-24 Thread kele
hi all, i have some codes like these: qset = Q(published_at__year = int(year), published_at__month = int(month), published_at__day= int(day)) # results = Article.objects.filter(qset) results =

change the DEBUG in settings.py base on the remoteaddr

2008-11-05 Thread kele
the debug flag in settings.py . what i want to do is to only change the DEBUG varialbe to True when just the specific remote address( ip) to send the request . cause i do not hope all my users can read the err msg while i am coding . something like this : if remoteAdd == 192.168.0.1 :

Re: maximum recursion depth exceeded ???

2008-10-20 Thread kele
sorry . i blow myself up ! i redefine the login function . ignore me . On Oct 20, 7:41 pm, kele <[EMAIL PROTECTED]> wrote: > i just try to make my first authenticate codes . but while in the > line > '      login(request, v) '   , i got this  runtime error  , and > 'maxim

maximum recursion depth exceeded ???

2008-10-20 Thread kele
i just try to make my first authenticate codes . but while in the line ' login(request, v) ' , i got this runtime error , and 'maximum recursion depth exceeded'. but i do not have any loop there . why ??? help . my codes r shown as below : def login(request ,template_name):

Exception Value: 'latin-1' codec can't encode characters in position 0-2: ordinal not in range(256)

2008-10-12 Thread kele
i am using the django 1.0 , and while i am try to post some data (japanes ,chinese characters) and insert to my Mysql db , i got this error . my table is create in utf8 character , and my setting.py already has the DEFAULT_CHARSET = 'utf-8' , where going wrong ?? i am getting MAD in this .