{
"info": {
"author": "Ognjen Maric",
"author_email": "ognjen.maric@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: JavaScript",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Site Management"
],
"description": "===========\nDjango Yama\n===========\n\nIntroduction\n============\n\nDjango Yama (Yet Another Menuing App) is a fairly generic menuing\napplication for Django 1.1 (and up). It supports hierarchical\n(tree-structure) menus of arbitrary depth, and enables you to create\nmenus linking to model objects and views from other Django apps, as\nwell as external URLs.\n\nThe admin part of the app is completely customized, utilizing jQuery\nto provide a simple user interface. The interface was mostly ripped\noff from^W ^W ^W influenced by `django-page-cms\n`_.\n\nThe best way of deploying django-yama in the front-end would probably\nbe by the means of a custom template context processor. A template tag\nis included which can render the menu as an unordered HTML list.\n\nInstallation and configuration\n==============================\n\nThe package is now available through PyPI. It depends on the\n`django-mptt `_ for its\nhierarchical structure, and obviously on Django itself, so you will\nalso need to install those.\n\nAlternatively, you can check out the latest revision from the Mercurial\nrepository: ::\n\n hg clone http://django-yama.googlecode.com/hg django-yama\n\nHaving installed Yama, you need a few of the usual steps:\n\n* Add ``'yama'`` to your ``INSTALLED_APPS``\n\n* To create the necessary database tables, run ``python manage.py\n syncdb``; alternatively, if you're using South, run ``python\n manage.py migrate yama``.\n\n* Copy the contents of the media directory to your ``MEDIA_ROOT``.\n You can also use `django-staticfiles\n `_.\n\nAnd a few more specific ones:\n\n* Since Yama uses Django's machinery for Javascript translation,\n you need to provide an entry for Django's ``javascript_catalog``\n view in your ``urls.py``. Typically, that would look something\n like: ::\n\n (r'^jsi18n/(?P\\S+?)/$', 'django.views.i18n.javascript_catalog'),\n\n* If you don't intend to link to objects or views (i.e. plan to enter\n the URLs directly), you're good to go. Otherwise, you need to tell\n Yama which models and views you wish to link to. You can either edit\n ``settings.py`` in the yama directory, or edit your site-wide\n ``settings.py`` and adjust the following couple of settings:\n\n * ``YAMA_MODELS``, which is a dictionary. Keys are pairs in the form\n ``('app_label', 'model name'), and values provide filters, which\n allow only a subset of model instances to be used as menu\n targets. Values can either be None, which indicates that no\n filtering is to be applied, or ``Q`` objects which express the\n desired filtering operations. Alternatively, values can also be\n callables which return ``Q`` objects; these callables are given a\n single argument, a ``HttpRequest`` object. In fact, callables are\n your only option for filtering in site-wide ``settings.py``, since\n importing ``Q`` objects at the top level would cause a circular\n import. Here's an example: ::\n\n def user_list(request):\n from django.db.models import Q\n return Q(is_active=True)\n \n YAMA_MODELS = {('auth', 'User') : user_list}\n\n All the given models are expected to implement the\n ``get_absolute_url`` method.\n\n * ``YAMA_VIEWS``, which is a sequence of pairs. Each pair takes the\n form of ``('reverse-able name', 'display name')``. Example: ::\n\n YAMA_VIEWS = (\n ('blog-index', _('Blog index')),\n ('blog.views.archive', _('Blog archive')),\n )\n \n Currently, the views are expected not to take any arguments (apart\n from ``request``).\n\nDisplaying menus\n================\n\nYama comes with a template tag for rendering ``Menu`` objects as\nunordered HTML lists. First, you need to load the tags in your\ntemplate: ::\n\n {% load yama %}\n\nThen you can use ``{% menu_as_ul menu_var %}`` to display the menu as\na list. Note that the top-level tags are not output, so you can\nhave control over the id of the list. Here is a sample output: ::\n\n - \n Item 1\n
\n - \n Item 2\n \n
\n - \n Item 3\n \n
\n\nYou can customize the displayed classes by passing keyword arguments\nto the tag, e.g: ::\n\n {% menu_as_ul top_menu dir_li_class=\"has_subitems\" %}\n\nThe default mapping is as follows: ::\n\n DEFAULT_CLASSES = {\n 'first_li_class' : \"first\", \n 'first_a_class' : \"a_first\",\n 'last_li_class' : \"last\", \n 'last_a_class' : \"a_last\",\n 'dir_li_class' : \"li_dir\",\n 'dir_a_class' : \"dir\",\n }\n\nThis is a bit assymetric, but it works out of the box with `these\nmenus `_.\n\n**Note**: currently, the template tag is quite database-heavy (hits\nthe DB at least once per menu item).",
"description_content_type": null,
"docs_url": null,
"download_url": "http://code.google.com/p/django-yama/downloads/list",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://code.google.com/p/django-yama/",
"keywords": null,
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "django-yama",
"package_url": "https://pypi.org/project/django-yama/",
"platform": "any",
"project_url": "https://pypi.org/project/django-yama/",
"project_urls": {
"Download": "http://code.google.com/p/django-yama/downloads/list",
"Homepage": "http://code.google.com/p/django-yama/"
},
"release_url": "https://pypi.org/project/django-yama/0.2/",
"requires_dist": null,
"requires_python": null,
"summary": "A menu application for Django",
"version": "0.2"
},
"last_serial": 209603,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "0a4252a59674a6c79475c1c1f433e29d",
"sha256": "34bd758df7924b5b84a5029beed9227d8d5990df972251cb477c63fdedb607f7"
},
"downloads": -1,
"filename": "django-yama-0.1.tar.gz",
"has_sig": false,
"md5_digest": "0a4252a59674a6c79475c1c1f433e29d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 64292,
"upload_time": "2010-09-29T00:12:10",
"url": "https://files.pythonhosted.org/packages/71/89/40a4004dcbf68b887ded0a4127486220e2f42fb64342f2cefd243e7b848a/django-yama-0.1.tar.gz"
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "22cd14d81f400d06b14d93b72d6fbd0e",
"sha256": "aa4494b764527866977e9ec523d433ef687ca4f845a604c1ccec8b39e4d4bf3c"
},
"downloads": -1,
"filename": "django-yama-0.2.tar.gz",
"has_sig": false,
"md5_digest": "22cd14d81f400d06b14d93b72d6fbd0e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 37494,
"upload_time": "2010-09-30T17:39:55",
"url": "https://files.pythonhosted.org/packages/75/68/4c3274a63b32577f09beed51e20e2ea68e61f6ea028c6d485925979c8cb6/django-yama-0.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "22cd14d81f400d06b14d93b72d6fbd0e",
"sha256": "aa4494b764527866977e9ec523d433ef687ca4f845a604c1ccec8b39e4d4bf3c"
},
"downloads": -1,
"filename": "django-yama-0.2.tar.gz",
"has_sig": false,
"md5_digest": "22cd14d81f400d06b14d93b72d6fbd0e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 37494,
"upload_time": "2010-09-30T17:39:55",
"url": "https://files.pythonhosted.org/packages/75/68/4c3274a63b32577f09beed51e20e2ea68e61f6ea028c6d485925979c8cb6/django-yama-0.2.tar.gz"
}
]
}