hi,
django latest trunk.
my first foray into writing a decorator for a view. My problem is that I get
this error message when the view is called:
The view conference.web.views.wrapper didn't return an HttpResponse object
The decorator is:
decorator---------------------------
class menu_enabled(object):
def __init__(self,menuname):
self.menuname = menuname
def __call__(self,f):
def wrapper(*args,**kwargs):
try:
mn = Menuitem.objects.get(name__iexact = self.menuname)
f(*args,**kwargs)
except:
msg = _("You are already registered")
return HttpResponseRedirect("/2009/message/%s/" % msg)
return wrapper
------end of decorator
obviously this f(*args,**kwargs) is not the correct way to call the view. Any
clues?
--
regards
kg
http://lawgon.livejournal.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---