Skip to main content

Django application that let's you work in your templates apart from having or not the corresponding views created.

Project description

Django application that let’s you work in your templates apart from having or not the corresponding views created.

Features

  • Design your template without having the corresponding view created.

  • Pass data to your template via the url.

Example

In your urls.py:

if settings.DEBUG:
    urlpatterns += patterns('', ('^_blackhole/', include('blackhole.urls'))

With that in place you should be able to access the url: /_blackhole/templates/<template name>/?<template data>

Let’s say you have the following template:

myapp/
  templates/
     404.html
     myapp/
       hello.jinja

You can access those templates through the urls:

/_blackhole/templates/404.html

and

/_blackhole/templates/myapp/hello.jinja

If you have a “message” variable in “hello.jinja” you can set that variable with:

/_blackhole/templates/myapp/hello.jinja?message=hola

You can also set nested values. Let’s say you have the variable “person.name” in “hello.jinja”, you can set that variable with:

/_blackhole/templates/myapp/hello.jinja?person.name=john

Installation

To install, simply:

$ pip install django-blackhole

Or, directly from the main repository:

$ pip install -e git+https://github.com/ikame/django-blackhole.git#egg=blackhole

See project’s website for more information.

History

0.1.1 (Thu 10 Oct 2013 10:58:08 AM CEST)

  • Updating documentation examples

0.1.0 (Thu 10 Oct 2013 10:58:08 AM CEST)

  • First version!

Project details


Download files

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

Source Distribution

django-blackhole-0.1.1.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file django-blackhole-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-blackhole-0.1.1.tar.gz
Algorithm Hash digest
SHA256 efe8b354b0e347404942280a8369f39b9fc0873dbb03405393508b22c141a68c
MD5 a3ec13bf822b5e24f91288480a00256d
BLAKE2b-256 d08ed5e1c35a4a8ec2eacbe0c4f616dca223d6fa6a4486378b43b51576808dda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page