Re: Using query set in views.py

2012-02-26 Thread Ian Clelland
On Sunday, February 26, 2012, Stanwin Siow wrote: > Ok disregard my previous question. > > Here's the latest one. > > > I have the following form in my HTML: > * * > * Keyword: * > * * > Your immediate problem here is that your element has an id, but no name attribute. That is why you are gettin

Re: internationalization makemessage don't work

2012-02-26 Thread Ian Clelland
On Sunday, February 26, 2012, nicolas HERSOG wrote: > Hi folks ! > > I'm trying for hours to internationalize my django website. > > I added to my settings.py this few lines : > > TIME_ZONE = 'Europe/Paris' > LANGUAGE_CODE = 'fr-FR' > > I added to all templates i want to translate the tag trans fo

Re: question about "\d" in url pattern

2012-02-26 Thread Masklinn
On 27 févr. 2012, at 07:23, Zheng Li wrote: > url(r'^friend_page/cheer/confirm/(?P\w+)/(?P\d+)/(?P\d+)/$', > 'cheer_confirm', name = 'friend_page'), > > def cheer_confirm(request, fid, key, point): > data = { > 'point' : 10 + point, > } > ... > > i got > Typ

question about "\d" in url pattern

2012-02-26 Thread Zheng Li
url(r'^friend_page/cheer/confirm/(?P\w+)/(?P\d+)/(?P\d+)/$', 'cheer_confirm', name = 'friend_page'), def cheer_confirm(request, fid, key, point): data = { 'point' : 10 + point, } ... i got TypeError: unsupported operand type(s) for +: 'int' and 'unicode' i d

Re: Anyone want to take over maintaining Instant Django?

2012-02-26 Thread Victor Hooi
Hi, Whatever happened to this? @sidmitra - did you manage to take over maintainership of this project? If not, @cjl - do you still have the scripts for this? Cheers, Victor On Thursday, 15 July 2010 23:25:44 UTC+10, sidmitra wrote: > > > I would be willing to take it on or we can also do it as

Re: Question on unknown error

2012-02-26 Thread Andy McKay
You can return whatever you want. All depends how you are using the result. On Sun, Feb 26, 2012 at 5:48 PM, Stanwin Siow wrote: > It's ok guys! > > > I figured out the error. > > At the end of the method we were returning 0 and 1 that will throw the > error. > > Is there some rule in django that

models.TimeField returning string rather than datetime.time with MySQL backend

2012-02-26 Thread smcoll
i need to interact with an existing MySQL database table, so i built a models.py file in a new app via introspection and then cleaned it up a bit. For the TIME types, i am using models.TimeField, which maps to a TIME type when using the MySQL backend. Here's a sample from that models.py file: ht

Re: internationalization makemessage don't work

2012-02-26 Thread Diego Schulz
On Sun, Feb 26, 2012 at 2:22 PM, nicolas HERSOG wrote: > Hi folks ! > > I'm trying for hours to internationalize my django website. > > I added to my settings.py this few lines : > > TIME_ZONE = 'Europe/Paris' > LANGUAGE_CODE = 'fr-FR' > > I added to all templates i want to translate the tag trans

Re: Any Singaporean Django developers out there?

2012-02-26 Thread Setiaman
Hi Kolbe, I'm a Singaporean and has been using Django for almost a year to develop Web Mobile which run on IPhone Android, etc. You can contact me at setiaman@gmail.com if you need help. Cheers, Setiaman Lee On Feb 26, 12:21 pm, Kolbe wrote: > It's like Django is nonexistent in Singapore!

Re: Question on unknown error

2012-02-26 Thread Stanwin Siow
It's ok guys! I figured out the error. At the end of the method we were returning 0 and 1 that will throw the error. Is there some rule in django that we are not supposed to return integers? Best Regards, Stanwin Siow On Feb 27, 2012, at 5:38 AM, Mario Gudelj wrote: > In print 'time' wha

Re: Any Singaporean Django developers out there?

2012-02-26 Thread konatufe
I'm staying in Singapore, for a few days, but I'm not singaporean, I'm from Chile. Anyway if you need something. Happy to help you if I can. On Feb 26, 12:21 pm, Kolbe wrote: > It's like Django is nonexistent in Singapore! -- You received this message because you are subscribed to the Google Gr

Re: Question on unknown error

2012-02-26 Thread Andy McKay
Please give us the full traceback and exact line of code it occurred on. There isn't enough information right now. On Sun, Feb 26, 2012 at 1:38 PM, Mario Gudelj wrote: > In print 'time' what's time? Should you not have print exp_datetime? > > > On 27 February 2012 01:27, Stanwin Siow wrote: >> >

Re: How to come to #anchor After Form Submit with message rendering..

2012-02-26 Thread doniyor
oh okay, i will try it... there are jquery ajax form submit versions too, but it is a good idea thanks On 26 Feb., 15:30, bb6xt wrote: > Hi, > You could also pass a variable in the response's dictionary and use > javascript to check this variable and navigate appropriately. This > variable shoul

Re: Django and models with multiple foreign keys

2012-02-26 Thread akaariai
On Feb 26, 4:03 am, trudoe wrote: > In brief, can someone please help me to get a summary of all the trips > and activities? What's the best way to accomplish that? Is the model > correct? >From the looks of it, you might benefit if the m2m relation would be hand-defined, and activities then rel

Re: Question on unknown error

2012-02-26 Thread Mario Gudelj
In print 'time' what's time? Should you not have print exp_datetime? On 27 February 2012 01:27, Stanwin Siow wrote: > Hello, > > I have the following method: > > def subscribe_keyword(userid,subDay =7,KEYWORD_SET=frozenset()): > try: > ... > > sub_datetime = datetime.datetime.now() >

Re: method for checking logged in user

2012-02-26 Thread Denis Darii
This is for you: https://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.models.User.is_authenticated On Sun, Feb 26, 2012 at 6:55 PM, rafiee.nima wrote: > Hi > I want to know is there any built in function to check if a user is > logged in > actually I want to check if a user fro

method for checking logged in user

2012-02-26 Thread rafiee.nima
Hi I want to know is there any built in function to check if a user is logged in actually I want to check if a user from a request is logged in or not tnx -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

internationalization makemessage don't work

2012-02-26 Thread nicolas HERSOG
Hi folks ! I'm trying for hours to internationalize my django website. I added to my settings.py this few lines : TIME_ZONE = 'Europe/Paris' LANGUAGE_CODE = 'fr-FR' I added to all templates i want to translate the tag trans for the sentence I want to internationalize exemple : {% trans "artic

a new pluggable voting system for django

2012-02-26 Thread M. Can Bayrak
hi, i created a pluggable voting system for django. check out it's features from here: https://github.com/miratcan/qhonuskan-votes i'm waiting for your reviews, bug reports and other contributions. thanks. -- You received this message because you are subscribed to the Google Groups "Django u

Re: Any Singaporean Django developers out there?

2012-02-26 Thread Denis Darii
Is there some demand for django programmers? On Sun, Feb 26, 2012 at 5:21 AM, Kolbe wrote: > It's like Django is nonexistent in Singapore! > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-use

Re: How to come to #anchor After Form Submit with message rendering..

2012-02-26 Thread bb6xt
Hi, You could also pass a variable in the response's dictionary and use javascript to check this variable and navigate appropriately. This variable should indicate if postback or new request. -- You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: How to come to #anchor After Form Submit with message rendering..

2012-02-26 Thread bb6xt
Hi, You could also pass a variable in the response's dictionary and use javascript to check this variable and navigate appropriately. This variable should indicate if postback or new request. -- You received this message because you are subscribed to the Google Groups "Django users" group. To po

Question on unknown error

2012-02-26 Thread Stanwin Siow
Hello, I have the following method: def subscribe_keyword(userid,subDay =7,KEYWORD_SET=frozenset()): try: ... sub_datetime = datetime.datetime.now() exp_datetime = sub_datetime + timedelta(days=subDay) print 'time' However when i try to run my app, The follo

Re: Using query set in views.py

2012-02-26 Thread Daniel Roseman
> > On Sunday, 26 February 2012 10:33:32 UTC, St@n wrote: > > Sorry if i have misled anyone. > > Here's a better view on what i'm asking. > > def get_keyword(): >return Keyword.objects.all() > > That method above returns me a list of Keyword items correct? > > How then do i get a specific ite

Re: Using query set in views.py

2012-02-26 Thread Stanwin Siow
Ok disregard my previous question. Here's the latest one. I have the following form in my HTML: Keyword:

Raspberry Pi Live

2012-02-26 Thread Addy Yeow
Hey folks, Just sharing a Django-powered page to get live status off raspberrypi.org: http://dazzlepod.com/raspberrypi/ Raspberry Pi is an ARM GNU/Linux box for $25 (model A) / $35 (model B). It is expected to be available for order in the next couple of days but the first batch will only see rel

Re: Using query set in views.py

2012-02-26 Thread Stanwin Siow
Sorry if i have misled anyone. Here's a better view on what i'm asking. def get_keyword(): return Keyword.objects.all() That method above returns me a list of Keyword items correct? How then do i get a specific item from that list? Keyword is a table in my database but i need a specific co

Using query set in views.py

2012-02-26 Thread Daniel Roseman
Your question is not at all clear. You can use whatever you like in your view. What problem are you having? -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/djan

Using query set in views.py

2012-02-26 Thread Stanwin Siow
Hello, I was wondering if we are able to use querysets in views.py so i can use one of the columns in my method below: def keyword_subscribe(request): keyword= '' if request.method == 'POST': subscription_days = "7" new_keyword = request.POST.get('myTextField') n