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 <stanwin.kts...@gmail.com> 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 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' what's time? Should you not have print exp_datetime? > > On 27 February 2012 01:27, Stanwin Siow <stanwin.kts...@gmail.com> wrote: >> >> 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 following error throws at those two lines. >> >> Err: sequence item 0: expected string, int found >> >> Is there something wrong with the module? >> >> >> >> >> >> Best Regards, >> >> Stanwin Siow >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.