diff --git a/docs/conf.py b/docs/conf.py index 3aa6fd48e..e7932eadc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,7 +40,7 @@ 'extensions.zinnia_docs'] intersphinx_mapping = { - 'django': ('http://readthedocs.org/docs/django/en/latest/', None), + 'django': ('https://django.readthedocs.io/en/latest/', None), } # Add any paths that contain templates here, relative to this directory. diff --git a/docs/extensions/zinnia_docs.py b/docs/extensions/zinnia_docs.py index 69dff8624..0434081d8 100644 --- a/docs/extensions/zinnia_docs.py +++ b/docs/extensions/zinnia_docs.py @@ -7,8 +7,8 @@ import inspect from django.db import models +from django.utils.encoding import force_text from django.utils.html import strip_tags -from django.utils.encoding import force_unicode def skip_model_member(app, what, name, obj, skip, options): @@ -22,10 +22,10 @@ def process_model_docstring(app, what, name, obj, options, lines): if inspect.isclass(obj) and issubclass(obj, models.Model): for field in obj._meta.fields: # Decode and strip any html out of the field's help text - help_text = strip_tags(force_unicode(field.help_text)) + help_text = strip_tags(force_text(field.help_text)) # Decode and capitalize the verbose name, for use if there isn't # any help text - verbose_name = force_unicode(field.verbose_name).capitalize() + verbose_name = force_text(field.verbose_name).capitalize() if help_text: lines.append(':param %s: %s' % (field.attname, help_text)) @@ -40,19 +40,19 @@ def process_model_docstring(app, what, name, obj, options, lines): def setup(app): app.add_crossref_type( - directivename = 'setting', - rolename = 'setting', - indextemplate = 'pair: %s; setting', + directivename='setting', + rolename='setting', + indextemplate='pair: %s; setting', ) app.add_crossref_type( - directivename = 'templatetag', - rolename = 'ttag', - indextemplate = 'pair: %s; template tag' + directivename='templatetag', + rolename='ttag', + indextemplate='pair: %s; template tag' ) app.add_crossref_type( - directivename = 'templatefilter', - rolename = 'tfilter', - indextemplate = 'pair: %s; template filter' + directivename='templatefilter', + rolename='tfilter', + indextemplate='pair: %s; template filter' ) app.connect('autodoc-process-docstring', process_model_docstring) diff --git a/docs/requirements.txt b/docs/requirements.txt index 987a0f698..d3970c53c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ beautifulsoup4==4.6.0 -django==2.0.2 +django==2.0.3 django-contrib-comments==1.8.0 django-mptt==0.9.0 django-tagging==0.4.6