Skip to main content

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.

  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.

{% menu %}

Renders a navigation menu normally used as part of footer navigation element. Utilizes generic.models.Link objects configurable via Menu Preferences in admin to provide a flexible menu navigation system. Elements are ordered using position values as specified on generic.models.LinkPosition objects via admin. You can customize the resulting HTML by overriding the generic/inclusion_tags/menu.html template file. The template receives an object_list context variable, which is a collection of ordered generic.models.Link elements to display.

{% navbar %}

Renders a navigation bar normally used as part of main navigation element positioned at top of pages. Utilizes generic.models.Link objects configurable via Navbar Preferences in admin to provide a flexible navbar system. Elements are ordered using position values as specified on generic.models.LinkPosition objects via admin. You can customize the resulting HTML by overriding the generic/inclusion_tags/navbar.html template file. The template receives object_list and active_link context variables. object_list is a collection of ordered generic.models.Link elements to display and active_link is an generic.models.Link object determined to be active for the requested path.

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.

Metadata

Release files for jmbo-generic 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jmbo-generic 0.0.2
File Size Uploaded
jmbo-generic-0.0.2.tar.gz 250.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for jmbo-generic 0.0.2
File Interpreter ABI Platform
jmbo_generic-0.0.2-py2.7.egg Legacy Egg format - - Details
jmbo_generic-0.0.2-py2.6.egg Legacy Egg format - - Details

Total release size: 808.4 kB

Release files / jmbo-generic-0.0.2.tar.gz

Download URL jmbo-generic-0.0.2.tar.gz
Size 250.0 kB
Tags Source
SHA-256 checksum
How to use checksums
48a3dc0ed2b0fd3023097216cfb87a47c5d1f4b12ef1fdf8d07bf118929c52ea
BLAKE2b-256 checksum
How to use checksums
a1ae0c96b72bb1f026cb76e252e299a7fb06393659a4a808f49c7b21d0a7e9da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / jmbo_generic-0.0.2-py2.7.egg

Download URL jmbo_generic-0.0.2-py2.7.egg
Size 279.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
42e8f8b0399b3a41ed418a4a6b57a7a3dcaa7d128790a8e9889e495ef6640f03
BLAKE2b-256 checksum
How to use checksums
5e84c0e7cd29947a7d55a193cc555103e89587a3ab5cc671ff120d7e29bb34ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / jmbo_generic-0.0.2-py2.6.egg

Download URL jmbo_generic-0.0.2-py2.6.egg
Size 279.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
8e0bdf8aebae019ccd0cedd7bec0685ad5246b508c0dfe52ebf04fe386b3caa9
BLAKE2b-256 checksum
How to use checksums
b185be0f85c2cb02fb2c5217272469e249ec0c4c5a316fe93609184dc08e6713
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

3 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page