I'll be really grateful if someone can take the time to explain these lines of code. Its from contrib.admin.options
def wrap(view):
def wrapper(*args, **kwargs):
return self.admin_site.admin_view(view)(*args, **kwargs) # This is the brain twisting line
return update_wrapper(wrapper, view)
The syntax foo.bar()(*osama **obama) is just blowing fuses in my brain and then from the code above, I can't even find where admin_view is defined.
Thanks for your time.
--
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment