google-code-export / django-grappelli

Automatically exported from code.google.com/p/django-grappelli
0 stars 0 forks source link

Template syntax error if docutils isn't installed #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install django-grappelli
2. Click on the documentation link

What is the expected output? What do you see instead?
If docutils isn't installed, the documentation link shouldn't exist.
Since it exists, I clicked on it, wondering how it would work without
docutils. Then there is a TemplateSyntax error because the admindocs makes
a "missing docutils" page which extends the base admin template. However,
admin docs doesn't use RequestContext, so request isn't in the context.
Then the get_messages tag blows up. Searching on the topic just makes you
think you didn't install the context processor, which isn't really the problem.

What version of the product are you using? On what operating system?
r692.

Please provide any additional information below.

Original issue reported on code.google.com by alexander.j.robbins@gmail.com on 15 Dec 2009 at 7:35

GoogleCodeExporter commented 9 years ago
which documentation link are you talking about? the one in the header or in the
sidebar-navigation?

Original comment by sehmaschine on 15 Dec 2009 at 8:02

GoogleCodeExporter commented 9 years ago
I believe both documentation links were bad. I understand that the sidebar-nav 
comes 
from a fixture, so it would be hard to fix. However, the django admin normally 
hid the 
topic documentation link until docutils was installed.

The problem could be fixed by wrapping the get_messages tag in a {% if request 
%} 
block. Then the admindocs error page would display to explain that the doc 
pages 
require docutils.

Original comment by alexander.j.robbins@gmail.com on 15 Dec 2009 at 8:08

GoogleCodeExporter commented 9 years ago

Original comment by sehmaschine on 18 Dec 2009 at 10:17