This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

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 <template-variable-name token of the tag is provided, the view’s response is assigned to the given template variable. Otherwise, the response content is returned in place.

When the response is assigned to a template variable, the http response is represented as a HttpResponseProxy object which contains a template-useable interface for fetching the response code, headers, and content. Examples:

{% ifequal response.status_code "200" %}
{{ response }}
{% endifequal %}

HttpResponseProxy behaves is a dict-like object. The http response headers are set as the dict items and their names are transposed for use in templates, i.e. ‘Content-type’ becomes ‘content_type’. For example:

{% ifequal response.content_type "text/html" %}
{% endifequal %}
Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-viewssi-0.1.1.tar.gz (4.9 kB) Copy SHA256 Checksum SHA256 Source Jan 30, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting