It sounded like you wanted to show something to the user, but don't keep the info from yourself as well (with respect to monitoring the site). So use the django messages framework to tell them something when wrong (not the exception details), or if you can't even render the attempted workflow then render a custom error page with the same message. Meanwhile, make sure to log the event with python logging so you can see what *really* went wrong.
On Mon Nov 03 2014 at 8:04:02 AM Daniel Grace <danwgr...@gmail.com> wrote: > OK, say if I have a function based view then how do I handle the exception? > > try: > context = RequestContext(request) > context_dict = {} > ... > return render_to_response('my_file.html', context_dict, context) > except Exception as e: > # what to do here? > > What about class based views (in form_valid etc)? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/a061d856-a2dd-4292-9080-693e59737e61%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/a061d856-a2dd-4292-9080-693e59737e61%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAODHHFAVu-eJdCdzb9d9scK0RDfbAA7_j0jeV%2B8zR-pQ4AeP_Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.