Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

An extremely simple dynamic TemplateView for django

Project description

# Overview

An extremely simple django app that renders templates based on URL path.

Kenny provides a single view, `SongBirdView` which takes the path url kwarg
and appends .html to it and serves it. It also rstrips any `/`s. It can also
take an optional `prefix` kwarg that will be prepended to the redered
template's path.

`SongBirdView` is a subclass of `django.views.generic.base.TemplateView`, so
all of it's documentation except for the `template_name` parameter apply.

So basically, to serve the mockups of your website under the `/mockup/` URL
you can do the following:

```
urlpatterns += (
url(r'^mockup/(?P<path>.*)$', SongBirdView.as_view(prefix='mockup/'))
)
```

This way, if you go to `localhost:8000/mockup/foo/`, your `mockup/foo.html`
template will be served.

# Installation

As easy as

```
pip install django-kenny
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-kenny, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size django-kenny-0.1.0.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page