diff --git a/docs/conf.py b/docs/conf.py index d16a0f2..974706f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,7 +40,7 @@ master_doc = 'index' # General information about the project. project = 'django-mailbox' -copyright = '2014, Adam Coddington' +copyright = '2020, Adam Coddington' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -282,7 +282,7 @@ def process_docstring(app, what, name, obj, options, lines): # Add the field's type to the docstring if isinstance(field, models.ForeignKey): - to = field.rel.to + to = field.related_model lines.append(':type {}: {} to :class:`~{}.{}`'.format(field.attname, type(field).__name__, to.__module__, to.__name__)) else: lines.append(':type {}: {}'.format(field.attname, type(field).__name__)) diff --git a/tox.ini b/tox.ini index fcbd986..6998106 100644 --- a/tox.ini +++ b/tox.ini @@ -26,6 +26,7 @@ commands= deps= sphinx -r{toxinidir}/rtd_requirements.txt + . commands=make html clean SPHINXOPTS="-W --keep-going" changedir={toxinidir}/docs allowlist_externals=make