from django.shortcuts import render, redirectfrom pizza_club_order.forms import *from pizza_club_order.models import *from django.contrib import authfrom datetime import timedelta, date, datetime, time
auth.models.Group.objects.get(name='test')
Here's the error I get:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 334, in get
self.model._meta.object_name
DoesNotExist: Group matching query does not exist.
Can someone help me ?
Thanks,
Robin.
--
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...@googlegroups.com.
To post to this group, send email to django...@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/c4a83bd3-b32a-49cf-9e7e-65c819d143eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 334, in get
>
> self.model._meta.object_name
>
> DoesNotExist: Group matching query does not exist.
>
>
> Can someone help me ?
>
BTW, this is a standard exception raised by Django for queryset operations that act on single objects that are not found, most commonly for .get(). If there's a chance you'll hit this during normal operation, you'll need to catch the exception and handle it accordingly, or it will turn into a 500 error in the browser.
https://docs.djangoproject.com/en/1.8/ref/models/instances/#doesnotexist
-James