diff --git a/django/contrib/admindocs/views.py b/django/contrib/admindocs/views.py
index 475a558..33d9a7d 100644
a
|
b
|
from django.contrib.admin.views.decorators import staff_member_required
|
9 | 9 | from django.db import models |
10 | 10 | from django.shortcuts import render_to_response |
11 | 11 | from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist |
12 | | from django.http import Http404,HttpResponseForbidden |
| 12 | from django.http import Http404 |
13 | 13 | from django.core import urlresolvers |
14 | 14 | from django.contrib.admindocs import utils |
15 | 15 | from django.contrib.sites.models import Site |
… |
… |
def view_detail(request, view):
|
169 | 169 | def model_index(request): |
170 | 170 | if not utils.docutils_is_available: |
171 | 171 | return missing_docutils_page(request) |
172 | | m_list = [m._meta for m in models.get_models() if request.user.has_module_perms(m._meta.app_label)] |
| 172 | m_list = [m._meta for m in models.get_models()] |
173 | 173 | return render_to_response('admin_doc/model_index.html', { |
174 | 174 | 'root_path': urlresolvers.reverse('admin:index'), |
175 | 175 | 'models': m_list |
… |
… |
def model_detail(request, app_label, model_name):
|
180 | 180 | if not utils.docutils_is_available: |
181 | 181 | return missing_docutils_page(request) |
182 | 182 | |
183 | | #Make sure user can access this model |
184 | | if not request.user.has_module_perms(app_label): |
185 | | raise Http404(_("App %r not found") % app_label) |
186 | | |
187 | 183 | # Get the model class. |
188 | 184 | try: |
189 | 185 | app_mod = models.get_app(app_label) |