mirror of
https://github.com/django/django.git
synced 2025-04-19 23:04:36 +00:00
magic-removal: Fixed #1252 -- Fixed bug in admin doc views. Thanks, the.twentysixth
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
387f453db5
commit
882c7c1885
@ -137,16 +137,16 @@ def model_index(request):
|
||||
if not utils.docutils_is_available:
|
||||
return missing_docutils_page(request)
|
||||
|
||||
models = []
|
||||
m_list = []
|
||||
for app in models.get_installed_model_modules():
|
||||
for model in app._MODELS:
|
||||
opts = model._meta
|
||||
models.append({
|
||||
m_list.append({
|
||||
'name': '%s.%s' % (opts.app_label, opts.module_name),
|
||||
'module': opts.app_label,
|
||||
'class': opts.module_name,
|
||||
})
|
||||
return render_to_response('admin_doc/model_index', {'models': models}, context_instance=RequestContext(request))
|
||||
return render_to_response('admin_doc/model_index', {'models': m_list}, context_instance=RequestContext(request))
|
||||
model_index = staff_member_required(model_index)
|
||||
|
||||
def model_detail(request, model):
|
||||
|
Loading…
x
Reference in New Issue
Block a user