On Wednesday, February 23, 2011 9:10:14 AM UTC+1, cuteangel wrote:
>
> this is the class from models.py-
> class NatPar(models.Model):
> @staticmethod
> def handle_review(self):
>
> <snip>
>
> and calling function is like this-
>
> response=NatPar.handle_review
>
> return render_to_response('review1.html',
> {'response':response})
>
> and its displays template like this--
>
> <function handle_review at 0x0237D030>
>
> so what's the problem in handle review..I already checked
> the code on python shell n its working there.
As Mike points out, you're not actually calling the function.
However, when you do, you'll have another problem. Staticmethods don't take
the `self` parameter, so you'll need to remove that.
--
DR.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.