Skip to main content

Jmbo generic behaviour/templates app.

Project description

Jmbo Generic

Jmbo generic behavior/templates app.

Installation

  1. Install or add jmbo-generic to your Python path.

  2. Install django-preferences as described here.

  3. Add generic to your INSTALLED_APPS setting.

  4. Add generic URL include to your project’s urls.py file:

    (r'^', include('generic.urls')),
    
  5. jmbo-generic includes a number of template sets allowing you to deliver lightweight(zero), mobile(basic) or desktop/touch(full) specific output. Specifying which template set to use is simply a matter of specifying a TEMPLATE_TYPE setting, and adding generic.loaders.TypeLoader to the TEMPLATE_LOADERS setting. For example to use the basic template set update your settings as follows:

    TEMPLATE_TYPE = "basic"
    
    TEMPLATE_LOADERS = (
        'generic.loaders.TypeLoader',
        ...other template loader classes...
    )
    

    This causes templates to be loaded from a path prefixed with whatever value was specified as the TEMPLATE_TYPE setting. For example in this case a template specified as generic/home.html would actually be loaded from basic/generic/home.html.

    Note

    You have to add TypeLoader as the first loader for it to resolve templates correctly.

  6. jmbo-generic includes static media resources which you need to configure as described in Django`s managing static files documentation.

Models

generic.models.LinkPosition

Used to determine position/order of elements in {% menu %} and {% navbar %} inclusion tags.

Fields
position

Specifies position/order of link in {% menu %} and {% navbar %} inclusion tags.

Inclusion Tags

generic.templatetags.generic_inclusion_tags

Provides generic inclusion tags like {% menu %} and {% navbar %}. Load these tags by including {% load generic_inclusion_tags %} in your templates.

Authors

Praekelt Foundation

  • Shaun Sephton
  • Hedley Roos

Changelog

0.0.2 (2011-09-27)

  1. Detail view.
  2. Element preferences.

0.0.1 (2011-09-21)

  1. Initial release.

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

jmbo-generic-0.0.2.tar.gz (250.0 kB view hashes)

Uploaded source

Built Distributions

jmbo_generic-0.0.2-py2.7.egg (279.1 kB view hashes)

Uploaded 2 7

jmbo_generic-0.0.2-py2.6.egg (279.2 kB view hashes)

Uploaded 2 6

Supported by

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