Choices, requirements, assumptions
Lizard-ui is opinionated: it makes choices and prescribes (good!) technologies.
- Required: django-staticfiles. For a more verbose description, see Reinout's blog entry (written with lizard-ui in mind).
- Assumption: one screen, using the full width/height of the browser, without scrolling. Our main goal is showing a nice big map with a small header and a sidebar. You don't want to scroll a map. It is of course possible to have a scrollbar inside that main content area itself.
- Included: both jqueryui and jquerytools. Visual goodies. Jquerytools for the overlay and tabs, jqueryui for the rest (drag/drop and so).
License + licenses
Our own license is GPLv3.
- Apache 2.0 license.
- Jquery and jqueryui
- Dual licensed under the MIT or GPL Version 2 licenses. Includes Sizzle.js, released under the MIT, BSD, and GPL Licenses.
- No copyrights or licenses. Do what you like.
- Clear BSD license.
- Famfamfam icon set
- CC attribution license.
- Treeview jquery plugin
Here's an excerpt of a
settings.py you can use. The media and static root
directory setup assumes the use of buildout, but you can translate it to your
own filesystem setup:
And a suitable apache config hint:
Upgrading to Django 1.3
Lizard-ui 3.0 requires Django 1.3 as we want to start using class based views and some of the other 1.3 goodies. For that, you need to make some changes.
LOGGING, for instance with:
from lizard_ui.settingshelper import setup_logging LOGGING = setup_logging(BUILDOUT_DIR) # For production, use for instance: # LOGGING = setup_logging(BUILDOUT_DIR, console_level=None)
And remove any by-hand logging setup, for instance with
STATICFILES_FINDERSfrom lizard_ui, this adds a finder that also finds static media in /media in addition to the new /static:
from lizard_ui.settingshelper import STATICFILES_FINDERS
COMPRESS_ROOTcan now be removed from your settings as the defaults are now fine.
Switch from using
You can mount lizard-ui's urls, but it contains only live examples. So
perhaps you should only mount it in debug mode under
/ui. Handy, as it
contains reasonably full documentation on how to use it, including available
blocks and classes/IDs that you can use.
The base layout is defined in
realbase.html. You should however extend
lizard_ui/lizardbase.html and then override the blocks that you want.
A example of a common task: change the logo. For that, make a
static/lizard_ui directory in your django application (or site) and place a
logo.png in it. Django-staticfiles' mechanism will take your logo.png in
preference to lizard-ui's.
The first time, you'll have to run the "bootstrap" script to set up setuptools and buildout:
$> python bootstrap.py
And then run buildout to set everything up:
(On windows it is called
You'll have to re-run buildout when you or someone else made a change in
The current package is installed as a "development package", so
changes in .py files are automatically available (just like with
If you want to use trunk checkouts of other packages (instead of released
versions), add them as an "svn external" in the
and add them to the
develop = list in buildout.cfg.
Tests can always be run with