Closed GoogleCodeExporter closed 9 years ago
I cannot reproduce on the trunk. Can you check if it resolved?
Original comment by batiste....@gmail.com
on 25 Sep 2009 at 8:07
Ok, tested with rev 710, now corrected :)
Original comment by m.meylan@gmail.com
on 25 Sep 2009 at 10:03
Hmm. Still looks to be broken for me...
Original comment by intellin...@gmail.com
on 25 Sep 2009 at 2:15
I'm not really sure why it's happening. I've poured through the code of two
separate
sites. On one site, this error is happening, while on the other, it's completely
fine. I think of the page cms would render pages with or without backslashes, it
might fix the issue. Right now on one site, if I access without a trailing
backslash,
it returns 404, but with the backslash, renders appropriately.
On the other site, with the backslash renders appropriately while without the
backslash returns the AutoRenderHttpError.
I'll see if I can dig deeper into this tonight.
Original comment by intellin...@gmail.com
on 25 Sep 2009 at 2:36
Ah - here's the underlying cause. It *only* happens on pages that are set to
redirect
to another page. The other pages render fine with or without a trailing
backslash.
To sum it up: on pages set to redirect to another page, if there's a trailing
backslash in the URL, AutoRenderHttpError will be thrown.
Original comment by intellin...@gmail.com
on 25 Sep 2009 at 2:39
I have been using the details view with only_context and only recently
redirects were
added which now pops AutoRenderHttpError.
I worked around this by adding a only_response param to the auto_render
decorator
(see
http://github.com/jbeaurain/django-page-cms/commit/e0a9963bbced0451be9c1f3508a04
75c9b0940f8
).
Instead of only_context I now do:
def pages_details_intercept(request, path=None):
response = details(request, path=path, only_response=True)
if isinstance(response, HttpResponse):
return response
(template_name, context) = response
Original comment by jacques....@gmail.com
on 7 Jan 2010 at 12:52
Original issue reported on code.google.com by
intellin...@gmail.com
on 23 Sep 2009 at 3:28