This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

django-alacarte is a minimalist menu app for Django.

Installation

$ pip install django-alacarte

Usage

Add “alacarte” to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...,
    'alacarte',
)

In your root urls.py add the following code:

# ...

import alacarte
alacarte.autodiscover()

# Your url patterns

Note: You don’t need this if you use Django >= 1.7, autodiscovery is made automatically with AppConfig.

Create a file called menu.py inside the app of your choice and register its corresponding menus:

import alacarte


class BankTransactionsMenu(alacarte.Menu):
    label = 'Transactions'
    url_name = 'bank_transactions'


class BankBalanceMenu(alacarte.Menu):
    label = 'Balance'
    url_name = 'bank_balance'


class BankPremiumMenu(alacarte.Menu):
    label = 'Premium Offers'
    url_name = 'bank_premium_offers'

    def shown(self)
        user = self.context['user']
        return user.is_premium()


class BankMenu(alacarte.Menu):
    group = 'main'
    label = 'Bank'
    submenus = (
        BankTransactionsMenu(),
        BankBalanceMenu(),
        BankPremiumMenu(),
    )

    def shown(self):
        user = self.context['user']
        return user.is_authenticated()


alacarte.register(BankMenu)

Then in your template:

{% load alacarte %}
{# ... #}
    {# ... #}
    {% alacarte "main" %}
    {# ... #}
{# ... #}

Support

  • Django >= 1.3
  • Tested on Python 2.7 and 3.4

django-alacarte is not related to https://pypi.python.org/pypi/alacarte

Release History

Release History

0.1.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_alacarte-0.1.6-py2.py3-none-any.whl (7.3 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jul 24, 2015
django-alacarte-0.1.6.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Jul 24, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting