{ "info": { "author": "Fernando Macedo", "author_email": "fgmacedo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "===========\ndjango-yasp\n===========\n\n.. image:: https://badge.fury.io/py/django-yasp.png\n :target: https://badge.fury.io/py/django-yasp\n\n.. image:: https://travis-ci.org/fgmacedo/django-yasp.png?branch=master\n :target: https://travis-ci.org/fgmacedo/django-yasp\n\nAnother static page Django app.\n\nMain features:\n\n* It does not use the ``sites`` app.\n* Allows grouping pages by a menu.\n* Optional template overriding by page.\n* Template tags to get a page or a group of pages by menu.\n* Page has an image field (optional).\n* Page itens can specify a link (redirect).\n* Pages can be orderable (if `django-admin-sortable2`_ is installed).\n\n\n.. _django-admin-sortable2: https://github.com/jrief/django-admin-sortable2\n\nQuickstart\n----------\n\nInstall django-yasp::\n\n pip install django-yasp\n\nInclude it on INSTALLED_APPS::\n\n INSTALLED_APPS = [\n ...\n 'yasp',\n ]\n\n\nAdd to urls:\n\n.. code-block:: python\n\n url(r'^', include('yasp.urls', namespace='yasp')),\n\nAdd to middlewares:\n\n.. code-block:: python\n\n MIDDLEWARE_CLASSES = [\n ...\n 'yasp.middleware.StaticPageFallbackMiddleware',\n ]\n\n\nFeatures\n--------\n\nLink to static pages\n====================\n\nStatic pages in **yasp** are automatically routed to a slug that you specify when\ncreating your page. Your static pages can be grouped in a `Menu`_ object. So\nyour urls can be in the form ``menu-slug/page-slug`` or ``page-slug`` (pages\nwithout a relation to `Menu`_).\n\nTo create links to static pages there are useful templatetags, as follows.\n\n.. note::\n\n All menus/pages that are used in a templatetag will be automatically\n created if they don't exist.\n\n\nTo load all pages inside a menu:\n\n.. code-block:: django\n\n {% load yasp %}\n\n {% get_pages_from_menu 'about-us' as pages %}\n\n