Skip to content

Commit

Permalink
Move {generate,dump}_pep_pages docs to commands.rst (python#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhilmathy authored and berkerpeksag committed Sep 11, 2018
1 parent a4f059e commit 382561e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 26 deletions.
29 changes: 29 additions & 0 deletions docs/source/commands.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _management-commands:

Management Commands
===================

Expand Down Expand Up @@ -33,3 +35,30 @@ Command-line options
.. option:: --app-label <app_label>

Create initial data with the *app_label* provided.

.. _command-generate-pep-pages:

generate_pep_pages
------------------

This command generates ``pages.Page`` objects from the output
of the existing PEP repository generation process. You run it like::

$ ./manage.py generate_pep_pages

To get verbose output, specify ``--verbosity`` option::

$ ./manage.py generate_pep_pages --verbosity=2

It uses the conversion code in the ``peps/converters.py`` file, in an
attempt to normalize the formatting for display purposes.

.. _command-dump-pep-pages:

dump_pep_pages
--------------

This command simply dumps our PEP related pages as JSON to :attr:`sys.stdout`.
You can run like::

$ ./manage.py dump_pep_pages
31 changes: 5 additions & 26 deletions docs/source/pep_generation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,13 @@ The PEP Page Generation process is as follows:
3. Set ``PEP_REPO_PATH`` in ``pydotorg/settings/local.py`` to the location
of the cloned PEP Repository

4. Run in your ``pythondotorg`` repository::
4. Generate PEP pages in your ``pythondotorg`` repository
(More details at :ref:`command-generate-pep-pages`). You can run like::

$ ./manage.py generate_pep_pages

This process runs periodically via cron to keep the PEP pages up to date.

See :ref:`management-commands` for all management commands.

Management Commands
-------------------

generate_pep_pages
^^^^^^^^^^^^^^^^^^

This Django management command generates ``pages.Page`` objects from the output
of the existing PEP repository generation process. You run it like::

$ ./manage.py generate_pep_pages

To get verbose output run it like::

$ ./manage.py generate_pep_pages --verbosity=2

It uses the conversion code in the ``peps.converters`` module in an attempt to
normalize the formatting for display purposes.

dump_pep_pages
^^^^^^^^^^^^^^

This simply dumps our PEP related pages as JSON. The ``dumpdata`` content is
written to ``stdout`` just like a normal ``dumpdata`` command.

.. _PEP Repository: https://github.com/python/peps.git
.. _PEP Repository: https://github.com/python/peps.git

0 comments on commit 382561e

Please sign in to comment.