From ebff0ee808a8c6c2d80aae1fe8c4c42718e43517 Mon Sep 17 00:00:00 2001 From: Graham Dixon Date: Wed, 23 Jun 2021 20:28:32 +0100 Subject: [PATCH] GITC-57: Introduces admindocs to create admin pages from our models (#9179) --- app/app/settings.py | 1 + app/app/urls.py | 5 ++++- app/dashboard/models.py | 7 ++++--- app/retail/templates/admin/index.html | 3 +++ requirements/base.txt | 1 + 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/app/settings.py b/app/app/settings.py index 368d63191cd..281f2e0e1e8 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -85,6 +85,7 @@ 'django.contrib.admin', 'taskapp.celery.CeleryConfig', 'django_celery_beat', + 'django.contrib.admindocs', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', diff --git a/app/app/urls.py b/app/app/urls.py index cd6d2a99cd7..f32a201211c 100644 --- a/app/app/urls.py +++ b/app/app/urls.py @@ -295,7 +295,7 @@ dashboard.views.funder_dashboard_bounty_info, name='funder_dashboard_bounty_info' ), - + # quests re_path(r'^quests/?$', quests.views.index, name='quests_index'), @@ -771,6 +771,9 @@ ), re_path(r'^_administration/email/match_distribution$', retail.emails.match_distribution, name='match_distribution'), + # docs + re_path(r'^_administration/docs/',include('django.contrib.admindocs.urls')), + # settings re_path(r'^settings/email/(.*)', marketing.views.email_settings, name='email_settings'), re_path(r'^settings/privacy/?', marketing.views.privacy_settings, name='privacy_settings'), diff --git a/app/dashboard/models.py b/app/dashboard/models.py index f87148a5a4f..8e17a4b8b3e 100644 --- a/app/dashboard/models.py +++ b/app/dashboard/models.py @@ -2841,10 +2841,11 @@ def __str__(self): class Profile(SuperModel): - """Define the structure of the user profile. + """ + Define the structure of the user profile. - TODO: - * Remove all duplicate identity related information already stored on User. + TODO: + * Remove all duplicate identity related information already stored on User. """ diff --git a/app/retail/templates/admin/index.html b/app/retail/templates/admin/index.html index 2f9f1be4c9c..6481784b68f 100644 --- a/app/retail/templates/admin/index.html +++ b/app/retail/templates/admin/index.html @@ -120,6 +120,9 @@

{% trans 'Administrative Tasks' %}

+ diff --git a/requirements/base.txt b/requirements/base.txt index 4f2bf80f48c..a109fe621f9 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -115,3 +115,4 @@ rjsmin==1.1.0 rcssmin==1.0.6 libsass==0.20.1 graphqlclient==0.2.4 +docutils==0.17.1