diff --git a/docs/source/built_in_examples.rst b/docs/source/built_in_examples.rst new file mode 100644 index 0000000000000000000000000000000000000000..5800310f6a6295533916f8c0b1cb8ab47c0054ba --- /dev/null +++ b/docs/source/built_in_examples.rst @@ -0,0 +1,61 @@ +Built-In DD Examples +******************** + +To help showcase functionality (and help with DD internal +debugging/development), the DumpDie project has built-in example views. +The following describes how to access them from a given Django project. + +.. note:: + + These built-in example views are also a good way to test various + :doc:`Django DumpDie configuration settings <configuration>`, and see what + configuration works best for your local setup. + + +1. First, follow the installation instructions from the :doc:`quickstart` page, + to initially set up DD for your project. + +2. Update your site root urls to include the following: + + .. warning:: + + For production deployment, you probably don't want this url added to + your project. + It's probably best to not commit this line to your repository, + and to remove it before deployment in event that it is accidentally + committed. + + These urls are meant for debugging and example output only. + + .. code-block:: python + + urlpatterns = [ + + path('dd/', include('django_dump_die.urls')), + ... + ] + +3. Launch your project with the standard ``python manage.py runserver`` command. + +4. Open a new web browser to ``http://127.0.0.1:8000/dd/``. You should see page + output similar to below. + +---- + +.. image:: img/dd_built-in_examples.png + +---- + +5. From here, click any of the links to view what the DD project looks like, + for each given output grouping. + + For example: + + * ``"Simple" Type`` refers to very basic types, such as ``int``, + ``str``, ``bool``, and similar types. + * ``"Intermediate" Type`` refers to + `DateTime <https://docs.python.org/3/library/datetime.html>`_ and + `PathLib <https://docs.python.org/3/library/pathlib.html>`_, and similar + types. + * ``"Complex" Type`` refers to ``lists``, ``tuples``, ``dicts``, and similar + types. diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst index 96381cee1b32b40362171ebbefa16390d0069170..6c7de5a4a6e3335204422272451a840b724f09d5 100644 --- a/docs/source/configuration.rst +++ b/docs/source/configuration.rst @@ -1,7 +1,8 @@ Configuration ************* -There are various configuration options that can be set via Django Settings to +There are various configuration options that can be set via +`Django Settings <https://docs.djangoproject.com/en/dev/topics/settings/>`_ to control the overall look, feel, and functionality of the tool. diff --git a/docs/source/img/dd_built-in_examples.png b/docs/source/img/dd_built-in_examples.png new file mode 100644 index 0000000000000000000000000000000000000000..8aa9a30b55ed71b9353ab2a1bb8c4d3335b8c214 Binary files /dev/null and b/docs/source/img/dd_built-in_examples.png differ diff --git a/docs/source/index.rst b/docs/source/index.rst index 99b3f85d8b791d63ba29c5825112e952e18c9d49..3716cfb9217e5970a5c2fa3e3543ee9a768a8613 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -26,6 +26,7 @@ and `Symfony <https://symfony.com/>`_ frameworks. quickstart usage + built_in_examples configuration api_reference