Skip to content

Commit ecd0421

Browse files
committed
cleanup autodoc so it is all more legible
1 parent 417efee commit ecd0421

29 files changed

+456
-394
lines changed

doc/source/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Context configuration parameters may be any of the following:
167167
- **python**: A path to a python file. The locals defined in the file will
168168
comprise the context.
169169
- **a packaged resource**: Any of the above files imported as a packaged resource via
170-
:ref:`resource` to any of the above files.
170+
:mod:`render_static.resource` to any of the above files.
171171
- **import string**: to any of the above.
172172

173173
For example:

doc/source/index.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ these structures by transpiling client side code from the server side code keeps
1616
DRY.
1717

1818
:pypi:`django-render-static` includes Python to Javascript transpilers for:
19-
- Django's :function:`~django.urls.reverse` function (:templatetag:`urls_to_js`)
19+
- Django's :func:`~django.urls.reverse` function (:templatetag:`urls_to_js`)
2020
- PEP 435 style Python enumerations (:templatetag:`enums_to_js`)
2121
- Plain data define-like structures in Python classes and modules
2222
(:templatetag:`defines_to_js`)
@@ -43,7 +43,6 @@ encouraged! Especially additional template tags and filters!
4343
runtimes
4444
templatetags
4545
commands
46-
reference
47-
changelog
4846
migration
49-
47+
changelog
48+
reference/index

doc/source/migration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ There are some import path changes in 3.0:
2929
Template Filter Changes
3030
~~~~~~~~~~~~~~~~~~~~~~~
3131

32-
classes_to_js and modules_to_js template filters have been removed and
33-
replaced by the :ref:`defines_to_js` tag. To upgrade simply replace the old
32+
:templatetag:`classes_to_js` and modules_to_js template filters have been removed and
33+
replaced by the :templatetag:`defines_to_js` tag. To upgrade simply replace the old
3434
filter with the new tag and pass the first argument as the defined parameter
3535
and the second argument if one was provided to the indent parameter:
3636

doc/source/quick.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ URLs will generate out of the box by running:
105105
106106
$> ./manage.py renderstatic render_static/urls.js --dest ./urls.js
107107
108-
If this fails, you may need to add some :ref:`placeholders`.
108+
If this fails, you may need to add some :mod:`~render_static.placeholders`.
109109

110110
The output can be more customized as well. For example your settings file might look like:
111111

@@ -314,7 +314,7 @@ So you can now fetch paths like this:
314314

315315
If you get an exception when you run :django-admin:`renderstatic` that originated from a
316316
:class:`render_static.exceptions.URLGenerationFailed` exception, you mostly likely need to
317-
register some :ref:`placeholders` before calling :templatetag:`urls_to_js`.
317+
register some :mod:`~render_static.placeholders` before calling :templatetag:`urls_to_js`.
318318

319319
.. note::
320320
The JavaScript URL resolution is guaranteed to produce the same paths as Django's reversal

doc/source/reference.rst

Lines changed: 0 additions & 192 deletions
This file was deleted.

doc/source/reference/backends.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
backends
2+
--------
3+
4+
.. automodule:: render_static.backends.django
5+
6+
.. autoclass:: StaticDjangoTemplates
7+
8+
.. automodule:: render_static.backends.jinja2
9+
10+
.. autoclass:: StaticJinja2Templates

doc/source/reference/context.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
context
2+
-------
3+
4+
.. automodule:: render_static.context
5+
6+
.. autofunction:: resolve_context

doc/source/reference/engine.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
engine
2+
-------
3+
4+
.. automodule:: render_static.engine
5+
6+
.. autoclass:: StaticTemplateEngine
7+
:members:
8+
:special-members: __getitem__
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
exceptions
2+
----------
3+
4+
.. automodule:: render_static.exceptions
5+
6+
.. autoclass:: URLGenerationFailed
7+
.. autoclass:: ReversalLimitHit
8+

doc/source/reference/index.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. _reference:
2+
3+
=========
4+
Reference
5+
=========
6+
7+
.. automodule:: render_static
8+
9+
10+
.. toctree::
11+
:maxdepth: 2
12+
13+
engine
14+
backends
15+
loaders
16+
origin
17+
templatetags
18+
transpilers/index
19+
exceptions
20+
placeholders
21+
context
22+
resource

0 commit comments

Comments
 (0)