Skip to content

Commit ebff0ee

Browse files
authored
GITC-57: Introduces admindocs to create admin pages from our models (#9179)
1 parent 9b59ff2 commit ebff0ee

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

app/app/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
'django.contrib.admin',
8686
'taskapp.celery.CeleryConfig',
8787
'django_celery_beat',
88+
'django.contrib.admindocs',
8889
'django.contrib.auth',
8990
'django.contrib.contenttypes',
9091
'django.contrib.sessions',

app/app/urls.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@
295295
dashboard.views.funder_dashboard_bounty_info,
296296
name='funder_dashboard_bounty_info'
297297
),
298-
298+
299299

300300
# quests
301301
re_path(r'^quests/?$', quests.views.index, name='quests_index'),
@@ -771,6 +771,9 @@
771771
),
772772
re_path(r'^_administration/email/match_distribution$', retail.emails.match_distribution, name='match_distribution'),
773773

774+
# docs
775+
re_path(r'^_administration/docs/',include('django.contrib.admindocs.urls')),
776+
774777
# settings
775778
re_path(r'^settings/email/(.*)', marketing.views.email_settings, name='email_settings'),
776779
re_path(r'^settings/privacy/?', marketing.views.privacy_settings, name='privacy_settings'),

app/dashboard/models.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,10 +2841,11 @@ def __str__(self):
28412841

28422842

28432843
class Profile(SuperModel):
2844-
"""Define the structure of the user profile.
2844+
"""
2845+
Define the structure of the user profile.
28452846
2846-
TODO:
2847-
* Remove all duplicate identity related information already stored on User.
2847+
TODO:
2848+
* Remove all duplicate identity related information already stored on User.
28482849
28492850
"""
28502851

app/retail/templates/admin/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ <h2>{% trans 'Administrative Tasks' %}</h2>
120120
<ul>
121121
<a href="/_administrationfaucet/faucetrequest/?fulfilled=f&rejected=f">Process Faucet Requests</a>
122122
</ul>
123+
<ul>
124+
<a href="/_administration/docs">View the admin docs</a>
125+
</ul>
123126
</div>
124127

125128

requirements/base.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,4 @@ rjsmin==1.1.0
115115
rcssmin==1.0.6
116116
libsass==0.20.1
117117
graphqlclient==0.2.4
118+
docutils==0.17.1

0 commit comments

Comments
 (0)