Skip to main content

A Django app that provides template tags to easily incorporate smartmenus (http://www.smartmenus.org/).

Installation

To get started using django-smartmenus:

  • install it with pip:

    $ pip install django-smartmenus
  • add the app to INSTALLED_APPS. If you are using Django CMS, make sure it’s before menus:

    INSTALLED_APPS = (
        ...
        'django_smartmenus',
        'menus', #Only if you are using Django CMS
        ...
    )

Usage

The best way to see how it works is exploring the example project. But for the impatient, all you need to do is:

  • load smartmenus tags in the templates:

    {% load smartmenus_tags %}
  • Call smartmenus template tags where css and js files should show:

    {% smartmenus_css theme %}
    <script src="path/to/jquery"></script>
    {% smartmenus_js %}

    theme is a string based parameter. Out of box, theme can be one of ‘sm-blue’, ‘sm-clean’, ‘sm-mint’ and ‘sm-simple’. If you create a custom theme of your own, please put the theme file under static folder following smartmenus theme folder structure convention, ie. smartmenus/css/theme/theme.css.

  • Render menu html in the templates. Please refer to smartmenus tutorial to see what the html should be.

This app also supports Django CMS:

  • load smartmenus and menu tags in the templates:

    {% load menu_tags smartmenus_tags %}
  • Call Django CMS specific template tags anywhere in the templates:

    {% addtoblock "js" %}<script src="path/to/jquery"></script>{% endaddtoblock %}
    {% smartmenu_bootstrap_cms theme %}

    theme’s usage is the same as above.

  • Render Django CMS menu:

    <ul class="sm theme-class-name">
        {% show_menu 0 100 100 100 %}
    </ul>

    theme-class-name is a string based parameter. Please refer to smartmenus doc regarding possible values. Usually it’s the same as theme name unless it’s a custom theme with different naming conventions.

Metadata

Release files for django-smartmenus 0.1.0

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

Source distribution (sdist)

Source distribution for django-smartmenus 0.1.0
File Size Uploaded Provenance
django-smartmenus-0.1.0.tar.gz 38.6 kB Without provenance Details

Release files / django-smartmenus-0.1.0.tar.gz

Download URL django-smartmenus-0.1.0.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ee85b2a2057e54fb8d2a590b1c6e547345909a7201b14e18b3b6de3cdbc7120c
BLAKE2b-256 checksum
How to use checksums
5877d422df3713f98bb23c9fd769e04b685d0c91d77498a7da36c2a98839778b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-smartmenus 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

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