Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb52502c

Browse files
willingcberkerpeksag
authored andcommitted
Edit doc on pep generation and clear settings in local.py
1 parentac7b266 commitb52502c

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

‎docs/source/pep_generation.rst

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,43 @@ PEP Page Generation
66
Process Overview
77
----------------
88

9-
We are generating the PEP pages by lightly parsing and cleaning up the HTML output from the `PEP Mercurial Repository<http://hg.python.org/peps/>`_.
9+
We are generating the PEP pages by lightly parsing the HTML output from the
10+
`PEP Repository`_ and then cleaning up some post-parsing formatting.
1011

11-
The process is as follows:
12+
ThePEP Page Generationprocess is as follows:
1213

13-
1. Clone and/or update the PEP repo located in `settings.PEP_REPO_PATH` to the latest revision.
14-
2. Run `pep2html.py`
15-
3. Run `genpepindex.py`
16-
4. Once all PEP HTML pages are generated, run `./manage.py generate_pep_pages`
14+
1. Set ``PEP_REPO_PATH`` in ``pydotorg/settings/local.py`` to the location
15+
of the `PEP Repository`_.
16+
2. Run ``pep2html.py``
17+
3. Run ``genpepindex.py``
18+
4. After all PEP pages are generated into HTML, run::
1719

18-
..note::Steps 2 and 3 currently must be run using Python 2 and **NOT** Python 3 like the rest of Python.org
20+
$ ./manage.py generate_pep_pages
1921

20-
This processwill be run periodically via cron to keep the PEP pages up to date.
22+
This processruns periodically via cron to keep the PEP pages up to date.
2123

2224
Management Commands
2325
-------------------
2426

2527
generate_pep_pages
2628
^^^^^^^^^^^^^^^^^^
2729

28-
This Django management command generates `pages.Page` objectsbased onthe output of the existing PEP repository
29-
generation process. You run it like::
30+
This Django management command generates ``pages.Page`` objectsfromthe output
31+
of the existing PEP repositorygeneration process. You run it like::
3032

31-
./manage.py generate_pep_pages
33+
$./manage.py generate_pep_pages
3234

3335
To get verbose output run it like::
3436

35-
./manage.py generate_pep_pages --verbosity=2
37+
$./manage.py generate_pep_pages --verbosity=2
3638

37-
It uses the conversion code in the `peps.converters` module in an attempt to normalize the formatting for display
38-
purposes.
39+
It uses the conversion code in the ``peps.converters`` module in an attempt to
40+
normalize the formatting for displaypurposes.
3941

4042
dump_pep_pages
4143
^^^^^^^^^^^^^^
4244

43-
This simply dumps our PEP related pages as JSON like dumpdata would do with a --pks options if the site was using
44-
Django 1.6 or newer. The dumpdata content is written to stdout just like a normal dumpdata command.
45+
This simply dumps our PEP related pages as JSON. The ``dumpdata`` content is
46+
written to ``stdout`` just like a normal ``dumpdata`` command.
47+
48+
.. _PEP Repository:https://hg.python.org/peps/

‎pydotorg/settings/local.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
ALLOWED_HOSTS= ['*']
66

7-
PYTHON_ORG_CONTENT_SVN_PATH='/Users/flavio/working_copies/beta.python.org/build/data'
7+
# Set the path to the location of the content files for python.org
8+
# For example,
9+
# PYTHON_ORG_CONTENT_SVN_PATH = '/Users/flavio/working_copies/beta.python.org/build/data'
10+
PYTHON_ORG_CONTENT_SVN_PATH=''
811

912
DATABASES= {
1013
'default':dj_database_url.config(default='postgres:///pythondotorg')
@@ -20,7 +23,9 @@
2023

2124
EMAIL_BACKEND='django.core.mail.backends.console.EmailBackend'
2225

23-
PEP_REPO_PATH='/Users/frank/work/src/pythondotorg/tmp/peps'
26+
# Set the path to where the PEP repo's HTML source files are located
27+
# For example, PEP_REPO_PATH = '/Users/frank/work/src/pythondotorg/tmp/peps'
28+
PEP_REPO_PATH=''
2429

2530
# Use Dummy SASS compiler to avoid performance issues and remove the need to
2631
# have a sass compiler installed at all during local development if you aren't

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp