Custom Query (26788 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (7 - 9 of 26788)

1 2 3 4 5 6 7 8 9 10 11 12 13
Ticket Resolution Summary Owner Reporter
#28903 invalid Wheel files don't include the license properly nobody Garrett Jenkins
Description

I may be wrong, but assuming "license-file" is set in setup.cfg because someone wanted to include the license with wheel distributions, it should be changed to "license_file" instead, as per the wheel docs.

#28899 needsinfo recursive relationship only works one way nobody HenrySiau
Description
class Catalog(models.Model):
    parent = models.ForeignKey('self',related_name='children', on_delete=models.CASCADE, null=True, blank=True)


Catalog.parent always return null, while Catalog.children.all() works fine.

#28895 duplicate serialized_rollback = True causes an IntgrityError in LiveServerTestCase nobody Lyra2108
Description

Hey,

the project I am working on creates a set of required objects e.g. Groups,... within the database migrations. I would like this data also do be present, when I use LiveServerTestCases. But if I run the simple example below the 2nd test fails while the first is successful. If serialized_rollback = False, the tests fails like expected with a "DoesNotExist: Group matching query does not exist." exception. But if it is set to True, the exception changes to an integrity exception:

IntegrityError: duplicate key value violates unique constraint "django_content_type_app_label_45f3b1d93ec8c61c_uniq"
DETAIL:  Key (app_label, model)=(contenttypes, contenttype) already exists.

Testcase:

from django.conf import settings
from django.contrib.auth.models import Group
from django.contrib.staticfiles.testing import StaticLiveServerTestCase


class Test(StaticLiveServerTestCase):
    serialized_rollback = True

    @classmethod
    def setUpClass(cls):
        super(Test, cls).setUpClass()

    @classmethod
    def tearDownClass(cls):
        super(Test, cls).tearDownClass()

    def test_abc(self):
        group = Group.objects.get(name='groupname')
        assert group

    def test_def(self):
        group = Group.objects.get(name='groupname')
        assert group
1 2 3 4 5 6 7 8 9 10 11 12 13
Note: See TracQuery for help on using queries.
Back to Top