Package: jmbo-generic
Jmbo GenericJmbo generic behavior/templates app.ContentsJmbo GenericInstallationModelsgeneric.models.LinkFieldstitleview_namecategoryurlMethods & Propertiesget_absolute_url(self)is_active(self, request)generic.models.LinkPositionFieldsInclusion Tags{% menu %}{% navbar %}AuthorsChangelog0.0.2 (2011-09-27)0.0.1 (2011-09-21)InstallationInstall or addjmbo-genericto your Python path.Installdjango-preferencesas describedhere.Addgenericto yourINSTALLED_APPSsetting.AddgenericURL include to your project’surls.pyfile:(r'^', include('generic.urls')),jmbo-genericincludes 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 aTEMPLATE_TYPEsetting, and addinggeneric.loaders.TypeLoaderto theTEMPLATE_LOADERSsetting. For example to use thebasictemplate 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 theTEMPLATE_TYPEsetting. For example in this case a template specified asgeneric/home.htmlwould actually be loaded frombasic/generic/home.html.NoteYou have to addTypeLoaderas the first loader for it to resolve templates correctly.jmbo-genericincludes static media resources which you need to configure as described inDjango`s managing static files documentation.Modelsgeneric.models.LinkUsed in conjunction with{% menu %}and{% navbar %}to provide an admin configurable navbar and menu.FieldstitleA short descriptive title for link.view_nameView name to which this link will redirect. This takes precedence overcategoryandurlfields.categoryCategory to which this link will redirect. This takes precedence overurlfield.urlURL to which this menu link will redirect. Only used ifview_nameis not specified.Methods & Propertiesget_absolute_url(self)Returns URL to which link should redirect based on areversedview name as specified inview_namefield or category view for category specified incategoryfield or otherwise an explicitly provided URL as specified inurlfield.is_active(self, request)Determines whether or not the link can be consider active based on the request path.Trueif the request path can be resolved to the same view name as is contained inview_namefield. OtherwiseTrueif request path starts with URL as resolved for category contained incategoryfield. OtherwiseTrueif request path starts with URL as contained inurlfield.generic.models.LinkPositionUsed to determine position/order of elements in{% menu %}and{% navbar %}inclusion tags.FieldspositionSpecifies position/order of link in{% menu %}and{% navbar %}inclusion tags.Inclusion Tagsgeneric.templatetags.generic_inclusion_tagsProvides 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. Utilizesgeneric.models.Linkobjects configurable viaMenu Preferences in adminto provide a flexible menu navigation system. Elements are ordered usingpositionvalues as specified ongeneric.models.LinkPositionobjects via admin. You can customize the resulting HTML by overriding thegeneric/inclusion_tags/menu.htmltemplate file. The template receives  anobject_listcontext variable, which is a collection of orderedgeneric.models.Linkelements to display.{% navbar %}Renders a navigation bar normally used as part of main navigation element positioned at top of pages. Utilizesgeneric.models.Linkobjects configurable viaNavbar Preferences in adminto provide a flexible navbar system. Elements are ordered usingpositionvalues as specified ongeneric.models.LinkPositionobjects via admin. You can customize the resulting HTML by overriding thegeneric/inclusion_tags/navbar.htmltemplate file. The template receivesobject_listandactive_linkcontext variables.object_listis a collection of orderedgeneric.models.Linkelements to display andactive_linkis angeneric.models.Linkobject determined to be active for the requested path.AuthorsPraekelt FoundationShaun SephtonHedley RoosChangelog0.0.2 (2011-09-27)Detail view.Element preferences.0.0.1 (2011-09-21)Initial release.