{ "info": { "author": "Daniel F. Moisset", "author_email": "dmoisset@machinalis.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django Template Previewer\n=========================\n\nThis is a django app to be used in development environments only. Its\npurpose is to allow template writers to preview rendering of the templates\nproviding a handcrafted context, without having to write view code.\n\nIts goal it's provide template designers a way to test designs and UI without\nhaving to modify code, or generate custom data.\n\nInstallation\n============\n\nYou can install as any standard python package, from zip file or pypi:\n\n pip install django-template-previewer\n\nAfter that, all you need to do is enable the app into your django project\nadding it to the `INSTALLED_APPS` setting in `settings.py`:\n\n```python\nINSTALLED_APPS = (\n # ... yor regular apps here\n\n 'template_previewer',\n)\n```\n\nAlso, you should include url routes from the app into your `urls.py`:\n\n```python\n urlpatterns = patterns('',\n url(r'^_preview/', include('template_previewer.urls')),\n # ..Your regular URL patterns here\n )\n```\n\n**You should disable the application in production environments, as it exposes\nimplementations details, and may allow unauthorized access to data and execution\nof code.**\n\nNo syncdb/migration is required; this application does not use the database.\n\nThe app assumes you are using Django's app template loader and app staticfile\nfinder. Otherwise, its views won't work properly.\n\nNote that you require Django 1.4\n\nUsage\n=====\n\nAssuming you installed using the url route in the example above, and that you\nare using the standard django development server locally \n(`manage.py runserver`), you should get the template previewer UI by visiting\n with your browser. Javascript is required.\n\nYou should see something similar to:\n\n![Screenshot](https://raw.github.com/machinalis/django-template-previewer/master/doc/ss-initial.png)\n\nThe lower box is an html `iframe` where the preview will be shown. The template\npreviewer UI can be folded/unfolded by clicking on its title.\n\nThere you can type a template name in the text box, and click on \n\"Update context\". The template name should be written as a path reachable to\nyour template loader (i.e., any valid first argument to\n`django.template.loader.get_template`). If the template is reachable and can\nbe successfully loaded, the previewer UI will add entry boxes labeled with the\nnames of template variables required in the template.\n\nFor example, assuming we have the following template calles `sample.html`:\n\n```html\n

{{ title }}

\n