django-viewssi 0.1.1

Template tag for requesting views in templates (Django)

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
BSD License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Tamas Kemenczy
HOMEPAGE:
pypi.python.org
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
django-viewssi is a template tag for making simulated GET requests to Django application view functions. The HTTP response can be displayed in the given template.

Variations of usage of viewssi:

{% viewssi path.to.view %}
{% viewssi path.to.view arg,arg2,kwarg=val %}
{% viewssi path.to.view arg,arg2,kwarg=val as var %}
{% viewssi path.to.view arg,arg2,kwarg=val get p1=v1,p2=v2 as var %}


The first argument is the path to a view function to call. If the view requires args and/or kwargs, pass them as the second token in the tag. args and the values of kwargs are resolved to template variables unless they are quoted.

The view doesn't have to be exposed in a URL configuration. Essentially any function can be called that accepts one argument (the request) and returns a django.http.HttpResponse object.

You can pass a GET query string by including a get token in the tag followed by key=value pairs. Parameter values are also resolved to template variables unless they are quoted.

If the as

Last updated on January 31st, 2009

requirements

#template tag #GET requests #Django plugin #Django #GET #requests #template

Add your review!

SUBMIT