>From the documentation on signals: "Notice that the function takes a sender argument, along with wildcard keyword arguments (**kwargs); all signal handlers must take these arguments." When rewriting the function without those args: " "Signal receivers must accept keyword arguments (**kwargs)." AssertionError: Signal receivers must accept keyword arguments (**kwargs). When rewriting the function with def my_callback (**kwargs): it appears to be working correctly.
On Aug 31, 9:36 pm, Bob Waycott <[email protected]> wrote: > If you don't have a `sender` arg, why define it? You don't use `sender` > in your function anywhere. Neither do you use **kwargs. > > So, why not define it as you use it? > > def my_callback(): > user = threadlocals.get_current_user() > return ProductAttribute.objects.filter(value=user.username) > > def example(request): > user_products = my_callback() > ctx = RequestContext(request, {'user_products':user_products }} > return render_to_response('template.html',ctx) > > Does that help? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Satchmo 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/satchmo-users?hl=en -~----------~----~----~----~------~----~------~--~---
