Questions tagged [django-errors]

django-errors refers to error reporting system in Django

django-errors refers to error reporting system in Django.

See documentation.

215 questions
58
votes
3 answers

Multiple strings with str_detect R

I want to find multiple strings and put it in a variable, however I keep getting errors. queries <- httpdf %>% filter(str_detect(payload, "create" || "drop" || "select")) Error: invalid 'x' type in 'x || y' queries <- httpdf %>%…
Magick.M
  • 615
  • 1
  • 6
  • 6
55
votes
6 answers

How to see details of Django errors with Gunicorn?

I just deployed my Django (1.6) project with gunicorn and Nginx. It seems to be working fine but I have one page were I'm getting an HTTP 500 error and I can't find any details about the error anywhere. How do I get gunicorn to show me…
Greg
  • 45,306
  • 89
  • 231
  • 297
36
votes
6 answers

Manually trigger Django email error report

Django error reporting handles uncaught exceptions by sending an email, and (optionally) shows user a nice 500 error page. This works very well, but in a few instances I'd like to allow users to continue with their business uninterrupted, but still…
frnhr
  • 12,354
  • 9
  • 63
  • 90
15
votes
1 answer

Django: Field Error Unknown fields

I just installed OS X Lion, so I had to reinstall everything for Python2.7. In doing that I upgraded my Django to 1.3 from 1.2.3. When I try and runserver, I get an odd field error that I'm having a tough time deciphering. FieldError at / Unknown…
Emile
  • 3,464
  • 8
  • 46
  • 77
14
votes
5 answers

Make django templates strict

In a django template, a call to {{ var }} will silently fail if var is undefined. That makes templates hard to debug. Is there a setting I can switch so django will throw an exception in this case? The only hint at a solution I've found online is…
pseudosudo
  • 6,270
  • 9
  • 40
  • 53
13
votes
1 answer

Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` to be returned from the view, but received a ``

models.py class Wishlist(models.Model): home = models.ForeignKey(Home, on_delete=models.CASCADE, blank=False, null=False) user = models.ForeignKey(User, on_delete=models.CASCADE, blank=False, null=False) def __str__(self): …
11
votes
3 answers

How to correctly use assertRaises in Django

I have the following validation function in my model: @classmethod def validate_kind(cls, kind): if kind == 'test': raise ValidationError("Invalid question kind") which I am trying to test as follows: w = Model.objects.get(id=1)…
11
votes
3 answers

Where in django is the default 500 traceback rendered so that I can use it to create my own logs?

I would like to use it to generate html log files inside the process_exception() method of my custom middleware class, e.g: Exception caught. process_exception(request) called. process_exception calls whatever function returns default error…
10
votes
4 answers

django form error messages not showing

So I have my view: def home_page(request): form = UsersForm() if request.method == "POST": form = UsersForm(request.POST) if form.is_valid(): form.save() c = {} c.update(csrf(request)) …
SilentDev
  • 20,997
  • 28
  • 111
  • 214
9
votes
2 answers

Django Error Reporting - How to know which user triggered the error?

Is there a way I can customize Django error reporting so when it emails me it lets me know which user triggered the error? I'm in Django 1.2 if it matters. Much Thanks in advance!
Greg
  • 45,306
  • 89
  • 231
  • 297
8
votes
1 answer

Django Logging: Change sender email address from root@localhost to something else

In my settings.py i have the following logging config. If there's an error i get an email from root@localhost. My problem is that i have several projects and want all error messages sent to the same email adress. But now its very annoying to…
Registered User
  • 1,892
  • 4
  • 15
  • 15
7
votes
2 answers

Global Exception Handling in Django-rest-framework

Is there a way to handle all the exceptions globally without using try-except block in django rest framework. I want to convert html error page that django is throwing to a customised json object response. I have created an exception.py file in my…
7
votes
2 answers

Django 500 error for not-existing url in Debug=False

I'm using Django 2.1.3 in python 3.6.7. assume that I have this URL path: path('admin/', admin.site.urls) If I navigate to /ad while the DEBUG = True, I see normal Django 404 error page: But if I make DEBUG = False then the server shows up the…
M.A. Heshmat Khah
  • 740
  • 12
  • 27
6
votes
4 answers

Django Template Error: Could not parse the remainder: ',' from 'uid,'?

I am using Django forgot_password framework with custom template. I am using Django 1.5. My custom template password_reset_email.html looks like this: {% autoescape off %} You're receiving this e-mail because you requested a password reset for your…
pynovice
  • 7,424
  • 25
  • 69
  • 109
6
votes
4 answers

django - checking to see if filter returns anything in the queryset

I'm a newb to Django. I need to check to see if a queryset returns any values at all, and if not, to skip to the next item in the loop. I tried try.. except ObjectDoesNotExist and that's not working. If a filter doesn't find anything, what does…
mb52089
  • 872
  • 2
  • 10
  • 24
1
2 3
14 15