Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fast html prototype of your projects, using the powerful Django template system
Python JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
prototyping
static
templates
.gitignore
AUTHORS
README
__init__.py
manage.py
settings.py
urls.py

README

Django Prototype 
==============

This is a skeleton Django application to be used to create a fast html prototype of your projects, using the powerful Django template system.

Usage
-----
Templates are created as usual.

** Main page (dashboard)
Link to the main from the template: {{ return_link }} 



** Content for "authenticated" users

Link to switch between login/logout: 
{{change_login_link}} 

Show different options for anonymous/registered users:
{% if login %}info for registered user{% else %}info for anonymous{% endif %}



** images
Using the included templatetad "image", a set of random images is used to generate them.

The syntax is as follows: 
	{% image [width] [height] %}

For example: 
	{% image 300 200 %}



** Google Maps
Using the included templatetad "gmaps", different static maps can be generated

The syntax is as follows: 
	{% gmaps [width] [height] [maptype] %}
	where maptype can be any 'terrain', 'satellite', 'hybrid', 'roadmap'
	
For example: 
	{% gmaps 300 200 %}



** Random text
Creates random Latin text useful for providing test data in templates.

Usage format::

    {% lorem [count] [method] [random] %}

``count`` is a number (or variable) containing the number of paragraphs or
words to generate (default is 1).

``method`` is either ``w`` for words, ``p`` for HTML paragraphs, ``b`` for
plain-text paragraph blocks (default is ``b``).

``random`` is the word ``random``, which if given, does not use the common
paragraph (starting "Lorem ipsum dolor sit amet, consectetuer...").

Examples:
    * ``{% lorem %}`` will output the common "lorem ipsum" paragraph
    * ``{% lorem 3 p %}`` will output the common "lorem ipsum" paragraph
      and two random paragraphs each wrapped in HTML ``<p>`` tags
    * ``{% lorem 2 w random %}`` will output two random latin words



** Repeat content

There's a templatetag to do a loop inside templates:
{% load mytags %}
<ul>{% for i in 3|get_range %}
  <li>{{ i }}. Do something</li>
{% endfor %}</ul>


** partials
As usual, it's possible to create independent snippets of code, to be included everywhere with:
{% include "parts/mini_user_profile.html" %}

** template status
Adding a line on top of the templates, it's possible to indicate the current dev status
{# Here, title of the page (DONE) #}
{# here, title of the page (INCOMPLETE) #}


Kudos
-----
- Based on django-prototype.

- images:
	http://www.flickr.com/photos/niamor/3600299837/
	http://www.flickr.com/photos/xo-st/2648152355/
	http://www.flickr.com/photos/63873121@N00/3929731711/
	http://www.flickr.com/photos/epsos/3585168626
	http://www.flickr.com/photos/photonaut/553120058
Something went wrong with that request. Please try again.