On 1/12/06, bsoltani <[EMAIL PROTECTED]> wrote:
> How difficult would it be to make Django display DEBUG information only
> to a certain type of user?  i.e. have the nice debug error pages for
> the admins but not regular users?
>
> Not even sure if this is possible to implement

Of course it's possible. :)

You can set up a custom 500 handler
(http://www.djangoproject.com/documentation/tutorial3/#write-a-500-server-error-view)
that simply wraps the standard debug error view, checking whether
request.user is an admin before delegating to the standard error view.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to