Skip to content

Commit e15edd5

Browse files
committed
add some common placeholders, rtd fix
1 parent 3331cfb commit e15edd5

File tree

5 files changed

+25
-28
lines changed

5 files changed

+25
-28
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ You can report bugs and discuss features on the
4343
`Contributions <https://github.com/bckohan/django-render-static/blob/main/CONTRIBUTING.rst>`_ are
4444
encouraged! Especially additional template tags and filters!
4545

46+
`Full documentation at read the docs. <https://django-render-static.readthedocs.io/en/latest/>`_
47+
4648
Installation
4749
------------
4850

doc/requirements.txt

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
1-
sphinx-argparse==0.2.5 \
2-
--hash=sha256:60ab98f80ffd38731d62e267171388a421abbc96c74901b7785a8e058b438c17
3-
sphinx-rtd-theme==0.5.1 \
4-
--hash=sha256:fa6bebd5ab9a73da8e102509a86f3fcc36dec04a0b52ea80e5a033b2aba00113 \
5-
--hash=sha256:eda689eda0c7301a80cf122dad28b1861e5605cbf455558f3775e1e8200e83a5
6-
sphinx==3.5.1; python_version >= "3.5" \
7-
--hash=sha256:e90161222e4d80ce5fc811ace7c6787a226b4f5951545f7f42acf97277bfc35c \
8-
--hash=sha256:11d521e787d9372c289472513d807277caafb1684b33eb4f08f7574c405893a9
9-
sphinxcontrib-applehelp==1.0.2; python_version >= "3.5" \
10-
--hash=sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58 \
11-
--hash=sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a
12-
sphinxcontrib-devhelp==1.0.2; python_version >= "3.5" \
13-
--hash=sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4 \
14-
--hash=sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e
15-
sphinxcontrib-htmlhelp==1.0.3; python_version >= "3.5" \
16-
--hash=sha256:e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b \
17-
--hash=sha256:3c0bc24a2c41e340ac37c85ced6dafc879ab485c095b1d65d2461ac2f7cca86f
18-
sphinxcontrib-jsmath==1.0.1; python_version >= "3.5" \
19-
--hash=sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8 \
20-
--hash=sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178
21-
sphinxcontrib-qthelp==1.0.3; python_version >= "3.5" \
22-
--hash=sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72 \
23-
--hash=sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6
24-
sphinxcontrib-serializinghtml==1.1.4; python_version >= "3.5" \
25-
--hash=sha256:eaa0eccc86e982a9b939b2b82d12cc5d013385ba5eadcc7e4fed23f4405f77bc \
26-
--hash=sha256:f242a81d423f59617a8e5cf16f5d4d74e28ee9a66f9e5b637a18082991db5a9a
1+
sphinx-argparse==0.2.5
2+
sphinx-rtd-theme==0.5.1
3+
sphinxcontrib-applehelp==1.0.2; python_version >= "3.5"
4+
sphinxcontrib-devhelp==1.0.2; python_version >= "3.5"
5+
sphinxcontrib-htmlhelp==1.0.3; python_version >= "3.5"
6+
sphinxcontrib-jsmath==1.0.1; python_version >= "3.5"
7+
sphinxcontrib-qthelp==1.0.3; python_version >= "3.5"
8+
sphinxcontrib-serializinghtml==1.1.4; python_version >= "3.5"
9+
django-render-static=0.1.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-render-static"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = """Use Django's template engine to render static files at deployment time. Extend
55
Django's url reverse mechanism to JavaScript."""
66
authors = ["Brian Kohan <[email protected]>"]

render_static/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99

1010
__title__ = 'Django Render Static'
11-
__version__ = '0.1.0'
11+
__version__ = '0.1.1'
1212
__author__ = 'Brian Kohan'
1313
__license__ = 'MIT'
1414
__copyright__ = 'Copyright 2021 Brian Kohan'

render_static/placeholders.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,15 @@ def resolve_unnamed_placeholders(
183183

184184
register_variable_placeholder('app_label', 'site', app_name='admin')
185185
register_variable_placeholder('app_label', 'auth', app_name='admin')
186+
187+
# Register some common placeholders
188+
register_variable_placeholder(var_name='key', placeholder='a')
189+
register_variable_placeholder(var_name='key', placeholder=0)
190+
191+
# allauth
192+
register_variable_placeholder(var_name='uidb36', placeholder=0)
193+
194+
# DRF
195+
register_variable_placeholder(var_name='format', placeholder='a')
196+
register_variable_placeholder(var_name='pk', placeholder=0)
197+
register_variable_placeholder(var_name='pk', placeholder='a')

0 commit comments

Comments
 (0)