{ "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 \n\n\nTo get a specific page:\n\n.. code-block:: django\n\n {% load yasp %}\n\n {% get_page 'about-us/vision' as page %} {# Page 'vision' related to a menu 'about-us' #}\n {{page.title}}\n\n {% get_page 'contact' as page %} {# Page without a menu. #}\n {{page.title}}\n\nTo get a URL to a specific page:\n\n.. code-block:: django\n\n {% load yasp %}\n\n Our vision\n\n\nCustom templates\n================\n\nStatic pages will be rendered using the ``yasp/default.html`` template by\ndefault.\n\nYou can customize the template used to render a page by placing a template with\nthe same slug of the page, or directly on the ``template`` field on Admin.\n\nTemplate path resolution order:\n\n* The path in the ``template`` field of your page, if provided.\n* ``yasp/{menu_slug}/{page_slug}.html``\n* ``yasp/{page_slug}.html``\n* ``yasp/default.html``\n\n\nContext of a static page template:\n\n:menu: The `Menu`_ object.\n:content: The `FlatPage`_ object.\n:object: Alias to `content`.\n\n\nExternal link\n=============\n\nYou can use a static page instance to link to an external page.\n\nExample:\n\n.. code-block:: python\n\n >>> from yasp.models import Menu, FlatPage\n >>> menu = Menu.objects.create(name='About us', slug='about-us')\n >>> page = FlatPage.objects.create(menu=menu, slug='google', link='http://google.com', title='Google')\n >>> '{}'.format(page.get_absolute_url(), page.title)\n 'Google Inc.'\n\n >>> vision = FlatPage.objects.create(menu=menu, slug='vision', title='Vision')\n >>> '{}'.format(vision.get_absolute_url(), vision.title)\n 'Vision'\n\nThis construction is can be specially useful when you're build a navbar in\ntemplates:\n\n.. code-block:: django\n\n {% load yasp %}\n {% get_pages_from_menu 'about-us' as pages %}\n\n \n\n\nWill render as:\n\n.. code-block:: html\n\n \n\n\n\nRunning Tests\n--------------\n\nDoes the code actually work?\n\n::\n\n source /bin/activate\n (myenv) $ pip install -r requirements_test.txt\n (myenv) $ py.test\n\n\n\n\nHistory\n-------\n\n0.1.0 (2016-09-26)\n++++++++++++++++++\n\n* First release on PyPI.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fgmacedo/django-yasp", "keywords": "django-yasp", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-yasp", "package_url": "https://pypi.org/project/django-yasp/", "platform": "", "project_url": "https://pypi.org/project/django-yasp/", "project_urls": { "Homepage": "https://github.com/fgmacedo/django-yasp" }, "release_url": "https://pypi.org/project/django-yasp/0.5.0/", "requires_dist": null, "requires_python": "", "summary": "Yet Another Static Page Django app.", "version": "0.5.0" }, "last_serial": 2464660, "releases": { "0.2.0": [], "0.3.0": [ { "comment_text": "", "digests": { "md5": "a7ba78a5231928ae1e0ae36ba3f871f4", "sha256": "ed496e65252c645117bfdb9107bee86067041f062f67492c63be91b6503003f6" }, "downloads": -1, "filename": "django_yasp-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a7ba78a5231928ae1e0ae36ba3f871f4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 20048, "upload_time": "2016-09-27T17:56:55", "url": "https://files.pythonhosted.org/packages/b5/47/e1aafff095287b5a8c505142fde48975ce89be89fa0557514e795b18e130/django_yasp-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "22b143927a199fad1257ccef1ebe55af", "sha256": "3c72694a68f2cb6676a70c3cf367f91a4138f87823b7bd6e3b33f74af34d486a" }, "downloads": -1, "filename": "django-yasp-0.3.0.tar.gz", "has_sig": false, "md5_digest": "22b143927a199fad1257ccef1ebe55af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10644, "upload_time": "2016-09-27T17:56:52", "url": "https://files.pythonhosted.org/packages/34/86/67d38a999fc0d86d755fa4232a8b92d788196858d41ef215e5f96114b3f3/django-yasp-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "a61627ace0dcf378e7c9b3d7f50a8c8d", "sha256": "48ced411e8fd55a53748f22d9e0eb8bd9f0d601b5d56100a73eae1bf61fa7e42" }, "downloads": -1, "filename": "django_yasp-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a61627ace0dcf378e7c9b3d7f50a8c8d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 21533, "upload_time": "2016-09-27T20:08:36", "url": "https://files.pythonhosted.org/packages/95/19/360203eaee58fa098b1f2b47e29da8e2b74603388c94f057f3cd80845f9d/django_yasp-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "517a0941cab0a43c594a8fb881d1fdd0", "sha256": "a83cef84d3b8e37d8653b7d9d8d3a306fd743b85542ec284c4047c8458c48ca5" }, "downloads": -1, "filename": "django-yasp-0.4.0.tar.gz", "has_sig": false, "md5_digest": "517a0941cab0a43c594a8fb881d1fdd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11404, "upload_time": "2016-09-27T20:08:33", "url": "https://files.pythonhosted.org/packages/f6/4d/24b4c8cc96939e58c510320eb0facbce972fece579184b42201e8a7790c6/django-yasp-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "3e5c951788dd50d4526a1e9a479e8c19", "sha256": "1e65a79f302082f816bdc7e5af0c1e7f99c3a879fd77994dc487f0b89fa15122" }, "downloads": -1, "filename": "django_yasp-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3e5c951788dd50d4526a1e9a479e8c19", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 23532, "upload_time": "2016-09-27T20:14:23", "url": "https://files.pythonhosted.org/packages/47/2b/05b75c3581fadae43256cb814944897bb747d9934391ea07c41335eb5f92/django_yasp-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3ffa6e92bfdd2f5e196601e925a4b67", "sha256": "ba392d3e5dbec7e0d8134ff519f6eb7428afcf5792e22e4be4cced4c46b9cd34" }, "downloads": -1, "filename": "django-yasp-0.4.1.tar.gz", "has_sig": false, "md5_digest": "e3ffa6e92bfdd2f5e196601e925a4b67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12633, "upload_time": "2016-09-27T20:14:20", "url": "https://files.pythonhosted.org/packages/bb/d9/c93da1f5790d5e861665f480cd8a1658a2a86c903093fad654f835a3f37a/django-yasp-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "3925a984f11258f7afd4ed9a2685d4e7", "sha256": "2cc149ca4b539c17742983efe43c86614ddae9ca530ba7a2420f44ec25f6a3bd" }, "downloads": -1, "filename": "django_yasp-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3925a984f11258f7afd4ed9a2685d4e7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 23449, "upload_time": "2016-11-16T17:36:01", "url": "https://files.pythonhosted.org/packages/8f/c0/e5ef9ad8f21d4456b57d069776c7e544470695c6c2a1b8bd82f0e5fce7cd/django_yasp-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a40ea481f652f7b67c23fc2f41e2840", "sha256": "3e6913c5adfa63858e3f8a4db8fc8eaee0712b52102f209a439009bf084fb896" }, "downloads": -1, "filename": "django-yasp-0.5.0.tar.gz", "has_sig": false, "md5_digest": "3a40ea481f652f7b67c23fc2f41e2840", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12629, "upload_time": "2016-11-16T17:35:57", "url": "https://files.pythonhosted.org/packages/45/19/17bc11824c3b146754f91d7157063750e52a1bba1d0f7b90feac92741277/django-yasp-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3925a984f11258f7afd4ed9a2685d4e7", "sha256": "2cc149ca4b539c17742983efe43c86614ddae9ca530ba7a2420f44ec25f6a3bd" }, "downloads": -1, "filename": "django_yasp-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3925a984f11258f7afd4ed9a2685d4e7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 23449, "upload_time": "2016-11-16T17:36:01", "url": "https://files.pythonhosted.org/packages/8f/c0/e5ef9ad8f21d4456b57d069776c7e544470695c6c2a1b8bd82f0e5fce7cd/django_yasp-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a40ea481f652f7b67c23fc2f41e2840", "sha256": "3e6913c5adfa63858e3f8a4db8fc8eaee0712b52102f209a439009bf084fb896" }, "downloads": -1, "filename": "django-yasp-0.5.0.tar.gz", "has_sig": false, "md5_digest": "3a40ea481f652f7b67c23fc2f41e2840", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12629, "upload_time": "2016-11-16T17:35:57", "url": "https://files.pythonhosted.org/packages/45/19/17bc11824c3b146754f91d7157063750e52a1bba1d0f7b90feac92741277/django-yasp-0.5.0.tar.gz" } ] }