Skip to content

Commit cc0ee24

Browse files
committed
updates docs
1 parent ac5b272 commit cc0ee24

File tree

13 files changed

+113
-298
lines changed

13 files changed

+113
-298
lines changed

CHANGES

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Release 2.x (dev)
2-
-------------
1+
Release 2.3
2+
-----------
33
* Removes code producing DeprecationError
4-
* add `AUTO_CREATE_TRIGGERS` and deprecate `MANUAL_TRIGGERS`
4+
* add :setting:`AUTO_CREATE_TRIGGERS` and deprecate :setting:`MANUAL_TRIGGERS`
55
* add support for Postgres 13
6-
6+
* add ability to customise SQL to create triggers :setting:`TRIGGERS_FACTORY`
77

88
Release 2.2
99
-------------

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DJANGO?='last'
1111
develop:
1212
@pip install pipenv
1313
@sh -c "if [ '${DBENGINE}' = 'mysql' ]; then pip install MySQL-python; fi"
14-
@sh -c "if [ '${DBENGINE}' = 'pg' ]; then pip install -q psycopg2; fi"
14+
@sh -c "if [ '${DBENGINE}' = 'pg' ]; then pip install -q psycopg2-binary; fi"
1515
$(MAKE) .init-db
1616
@pipenv install -d --skip-lock
1717

@@ -48,7 +48,7 @@ fullclean:
4848

4949
docs: .mkbuilddir
5050
mkdir -p ${BUILDDIR}/docs
51-
pipenv run sphinx-build -aE docs/ ${BUILDDIR}/docs
51+
sphinx-build -aE docs/ ${BUILDDIR}/docs
5252
ifdef BROWSE
5353
firefox ${BUILDDIR}/docs/index.html
5454
endif

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ tox = "*"
2020
"psycopg2-binary" = "*"
2121
check-manifest = "*"
2222
sphinx = "*"
23+
sphinx-issues = "*"
2324
twine="*"
2425

2526
[requires]

docs/_ext/github.py

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

docs/_ext/version.py

Lines changed: 1 addition & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from sphinx.util.console import bold
66
# RE for option descriptions without a '--' prefix
77
from sphinx.writers.html import HTMLTranslator
8+
from sphinx.errors import ExtensionError
89

910
simple_option_desc_re = re.compile(
1011
r'([-_a-zA-Z0-9]+)(\s*.*?)(?=,\s+(?:/|-|--)|$)')
@@ -32,99 +33,8 @@ def setup(app):
3233
indextemplate="pair: %s; field lookup type",
3334
)
3435
app.add_config_value('next_version', '0.0', True)
35-
app.add_directive('versionadded', VersionDirective)
36-
app.add_directive('versionchanged', VersionDirective)
3736
app.add_crossref_type(
3837
directivename="release",
3938
rolename="release",
4039
indextemplate="pair: %s; release",
4140
)
42-
43-
class DjangoHTMLTranslator(HTMLTranslator):
44-
"""
45-
Django-specific reST to HTML tweaks.
46-
"""
47-
48-
# Don't use border=1, which docutils does by default.
49-
def visit_table(self, node):
50-
self.context.append(self.compact_p)
51-
self.compact_p = True
52-
self._table_row_index = 0 # Needed by Sphinx
53-
self.body.append(self.starttag(node, 'table', CLASS='docutils'))
54-
55-
def depart_table(self, node):
56-
self.compact_p = self.context.pop()
57-
self.body.append('</table>\n')
58-
59-
def visit_desc_parameterlist(self, node):
60-
self.body.append('(') # by default sphinx puts <big> around the "("
61-
self.first_param = 1
62-
self.optional_param_level = 0
63-
self.param_separator = node.child_text_separator
64-
self.required_params_left = sum([isinstance(c, addnodes.desc_parameter)
65-
for c in node.children])
66-
67-
def depart_desc_parameterlist(self, node):
68-
self.body.append(')')
69-
70-
71-
version_text = {
72-
'deprecated': 'Deprecated in Django-Concurrency %s',
73-
'versionchanged': 'Changed in Django-Concurrency %s',
74-
'versionadded': 'New in Django-Concurrency %s',
75-
}
76-
77-
def visit_versionmodified(self, node):
78-
self.body.append(
79-
self.starttag(node, 'div', CLASS=node['type'])
80-
)
81-
version_text = self.version_text.get(node['type'])
82-
if version_text:
83-
title = "%s%s" % (
84-
version_text % node['version'],
85-
":" if len(node) else "."
86-
)
87-
self.body.append('<span class="title">%s</span> ' % title)
88-
89-
def depart_versionmodified(self, node):
90-
self.body.append("</div>\n")
91-
92-
# Give each section a unique ID -- nice for custom CSS hooks
93-
def visit_section(self, node):
94-
old_ids = node.get('ids', [])
95-
node['ids'] = ['s-' + i for i in old_ids]
96-
node['ids'].extend(old_ids)
97-
HTMLTranslator.visit_section(self, node)
98-
node['ids'] = old_ids
99-
100-
101-
102-
class VersionDirective(Directive):
103-
has_content = True
104-
required_arguments = 1
105-
optional_arguments = 1
106-
final_argument_whitespace = True
107-
option_spec = {}
108-
109-
def run(self):
110-
if len(self.arguments) > 1:
111-
msg = """Only one argument accepted for directive '{directive_name}::'.
112-
Comments should be provided as content,
113-
not as an extra argument.""".format(directive_name=self.name)
114-
raise self.error(msg)
115-
116-
env = self.state.document.settings.env
117-
ret = []
118-
node = addnodes.versionmodified()
119-
ret.append(node)
120-
121-
if self.arguments[0] == env.config.next_version:
122-
node['version'] = "Development version"
123-
else:
124-
node['version'] = self.arguments[0]
125-
126-
node['type'] = self.name
127-
if self.content:
128-
self.state.nested_parse(self.content, self.content_offset, node)
129-
env.note_versionchange(node['type'], node['version'], node, self.lineno)
130-
return ret

docs/api.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ConcurrentModelAdmin
7575
--------------------
7676
.. autoclass:: concurrency.admin.ConcurrentModelAdmin
7777

78-
.. warning:: If you customize ``fields`` or ``fieldsets`` remember to add version field to the list. (See issue :ghissue:`81`)
78+
.. warning:: If you customize ``fields`` or ``fieldsets`` remember to add version field to the list. (See issue :issue:`81`)
7979

8080

8181

@@ -252,6 +252,22 @@ Templatetags
252252
.. autofunction:: concurrency.templatetags.concurrency.is_version
253253

254254

255+
--------
256+
Triggers
257+
--------
258+
259+
.. _triggerfactory:
260+
261+
TriggerFactory
262+
--------------
263+
264+
.. versionadded:: 2.3
265+
266+
.. autoclass:: concurrency.triggers.TriggerFactory
267+
268+
.. seealso:: :setting:`TRIGGERS_FACTORY`
269+
270+
255271

256272
-------------
257273
Test Utilties

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
'sphinx.ext.autosummary',
3838
'sphinx.ext.coverage',
3939
'sphinx.ext.viewcode',
40-
'version',
41-
'github']
40+
'sphinx_issues',
41+
'version'
42+
]
4243

4344
intersphinx_mapping = {
4445
'python': ('https://docs.python.org/2.7/', None),

docs/requirements.pip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sphinx
2-
django
1+
sphinx==3.5.2
2+
django==3.1

0 commit comments

Comments
 (0)