{ "info": { "author": "Marcelo Canina", "author_email": "me@marcanuy.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "MdPages - Markdown Pages\n========================\n\nMdpages is a simple Django app to generate pages from Markdown files.\n\nPages also can have a Table of Content automatically generated based\non headings.\n\nQuick start\n-----------\n\nSupposing you want to create an **About** page, having the markdown\nfile at `/pages/content/about.md`.\n\n1. Add \"mdpages\" to your INSTALLED_APPS setting like this:\n\n.. code:: python\n\n INSTALLED_APPS = [\n\t ...\n\t 'mdpages',\n ]\n\n2. Set the location of the directory that will contain the Markdown\n files in settings with `MDPAGES_CONTENT_DIR`:\n\n.. code:: python\n\n MDPAGES_CONTENT_DIR = '{}/pages/content/'.format(BASE_DIR)\n\n3. Add the template that will contain the Markdown generated content,\n you will have two variables available: `body` and `toc` (for the\n table of contents), for example create a template\n `/templates/mdpages/page.html` with contents like:\n\n.. code:: python\n\n {% extends \"base.html\" %}\n\n {% block title %}{{title}}{%endblock%}\n {% block description %}{{description}}{%endblock%}\n\n {% block content %}\n
\n {{ toc|safe }}\n\t
\n\t{{ body|safe }}\n
\n {% endblock %}\n\nAnd add the template path to settings `MDPAGES_TEMPLATE_NAME`:\n\n.. code:: python\n\n MDPAGES_TEMPLATE_NAME = 'mdpages/page.html'\n\n4. Create a view using `staticages.views.MdPageView` specifying\n the name of the Markdown file `md_file` and the `template_name`:\n\n.. code:: python\n\n from mdpages.views import MdPageView\n\n class AboutView(MdPageView):\n\t md_file = 'language-learning.md'\n\n\t # any kind of extra content used in your template\n\t extra_context = {\n\t\t 'title': 'About page',\n\t\t 'description': 'This is the about page of the site.'\n\t }\n\n5. Use it in your `urls.py`:\n\n.. code:: python\n\n from .views import AboutView\n\n urlpatterns = [\n\t path('about', AboutView.as_view()),\t\n ]\n\nReference\n---------\n\n- Markdown library https://python-markdown.github.io/reference/\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/marcanuy/django-mdpages/", "keywords": "django static", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-mdpages", "package_url": "https://pypi.org/project/django-mdpages/", "platform": "", "project_url": "https://pypi.org/project/django-mdpages/", "project_urls": { "Homepage": "https://github.com/marcanuy/django-mdpages/", "Source": "https://github.com/marcanuy/django-mdpages/", "Tracker": "https://github.com/marcanuy/django-mdpages/issues" }, "release_url": "https://pypi.org/project/django-mdpages/0.2/", "requires_dist": [ "Django (>=2.1)", "Markdown" ], "requires_python": "", "summary": "A simple Django app to generate pages from files.", "version": "0.2" }, "last_serial": 4917218, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "39daee9a75dfcd6cf92ed127b0e8dcf6", "sha256": "4448b370b8059d8e7d80a5752418e902b5b93052713f8037c395c53c1c79fcc0" }, "downloads": -1, "filename": "django_mdpages-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "39daee9a75dfcd6cf92ed127b0e8dcf6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4205, "upload_time": "2019-03-08T21:41:51", "url": "https://files.pythonhosted.org/packages/04/87/27a6839db31fc9b74c7f4d4e941c93321e2e9b51771ee904e5a39c4dff62/django_mdpages-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d81b6817b2b1b2acbd65abefa4ddab9", "sha256": "c01cd523cce3b34c2b24e1344f4391a8708aa4efe4e17042438bdea7d327b262" }, "downloads": -1, "filename": "django-mdpages-0.2.tar.gz", "has_sig": false, "md5_digest": "2d81b6817b2b1b2acbd65abefa4ddab9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3758, "upload_time": "2019-03-08T21:41:53", "url": "https://files.pythonhosted.org/packages/b1/8e/56be8c66d188f6f5c1aae96b5d406f17d31c20c0f46c96dceb0c43763080/django-mdpages-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "39daee9a75dfcd6cf92ed127b0e8dcf6", "sha256": "4448b370b8059d8e7d80a5752418e902b5b93052713f8037c395c53c1c79fcc0" }, "downloads": -1, "filename": "django_mdpages-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "39daee9a75dfcd6cf92ed127b0e8dcf6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4205, "upload_time": "2019-03-08T21:41:51", "url": "https://files.pythonhosted.org/packages/04/87/27a6839db31fc9b74c7f4d4e941c93321e2e9b51771ee904e5a39c4dff62/django_mdpages-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d81b6817b2b1b2acbd65abefa4ddab9", "sha256": "c01cd523cce3b34c2b24e1344f4391a8708aa4efe4e17042438bdea7d327b262" }, "downloads": -1, "filename": "django-mdpages-0.2.tar.gz", "has_sig": false, "md5_digest": "2d81b6817b2b1b2acbd65abefa4ddab9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3758, "upload_time": "2019-03-08T21:41:53", "url": "https://files.pythonhosted.org/packages/b1/8e/56be8c66d188f6f5c1aae96b5d406f17d31c20c0f46c96dceb0c43763080/django-mdpages-0.2.tar.gz" } ] }