Projects tagged ‘django’, ‘python’, ‘template’, and ‘widgets’


Jump to tag:

Projects tagged ‘django’, ‘python’, ‘template’, and ‘widgets’

Filtered by Project Tags django python template widgets

[1 total ]

0 Users

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]
Created 12 months ago.