Create a widgets.py in your application. There you will create a class that subclasses Widget.
example:
class Login(Widget):
template = "account/login.html"
def get_context():
... [More] return {"login_form":LoginForm()} the widget has access to the request and the user. In the template you can do the following now:
{% load widget %}
{% widget Login %}This will render the template with the context from the get_context function. Widgets will be auto discovered.
Code is in alpha stage and not even tested in a production. commits follow... patches are welcome [Less]