django-markdownx/docs-src/getting_started.rst

48 lines
1.1 KiB
ReStructuredText
Raw Normal View History

2017-04-23 12:52:52 +00:00
Getting Started
===============
2017-04-25 00:17:10 +00:00
1. First and foremost, add ``markdownx`` to the list of ``INSTALLED_APPS`` in :guilabel:`settings.py`.
2017-04-23 12:52:52 +00:00
.. code-block:: python
INSTALLED_APPS = (
# [...]
'markdownx',
)
2017-04-25 00:17:10 +00:00
You may alter default behaviours by adding and changing relevant variables in your settings. See
:doc:`customization <customization>` for additional information.
2. Add MarkdownX URL patterns to your :guilabel:`urls.py`.
You can do this using either of these methods depending on your style:
2017-04-23 12:52:52 +00:00
.. code-block:: python
urlpatterns = [
2017-04-25 00:17:10 +00:00
[...]
2017-04-23 12:52:52 +00:00
url(r'^markdownx/', include('markdownx.urls')),
]
2017-04-25 00:17:10 +00:00
or alternatively:
.. code-block:: python
:linenos:
from django.conf.urls import url, include
from markdownx import urls as markdownx
urlpatterns += [
url(r'^markdownx/', include(markdownx))
]
.. Important::
Don't forget to collect MarkdownX assets to your :guilabel:`STATIC_ROOT`. To do this, run:
.. code-block:: bash
2017-04-23 12:52:52 +00:00
2017-04-25 00:17:10 +00:00
python3 manage.py collectstatic
2017-04-23 12:52:52 +00:00
2017-04-25 00:17:10 +00:00
Replace ``python3`` with the your interpreter of choice.