Opened 7 years ago

Closed 3 years ago

Last modified 3 years ago

#11605 closed Bug (worksforme)

manage.py syncdb breaks for some proxy models

Reported by: jds Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If the proxy model is in an application listed before the parent model's application, the table does not get created.

I have an application, testapp, with this testapp/models.py:

from django.contrib.auth.models import User

class MyUser(User):
    class Meta:
        proxy = True

INSTALLED_APPS has testapp listed before django.contrib.auth. The auth_user table does not get created.

This is related to #11428. The patch shows where the issue is.

If this is intended behavior, a small addition to the Available Settings > INSTALLED_APPS documentation would clear this up.

Attachments (1)

patch.diff (1.2 KB) - added by jds 7 years ago.
agains 11368

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by jds

Attachment: patch.diff added

agains 11368

comment:1 Changed 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by pcardune

Just encountered this problem myself.

comment:3 Changed 7 years ago by Thejaswi Puthraya

Component: UncategorizedDatabase layer (models, ORM)

comment:4 Changed 6 years ago by Julien Phalip

Severity: Normal
Type: Bug

comment:5 Changed 6 years ago by Julien Phalip

Needs tests: set

comment:6 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 Changed 3 years ago by nott

Resolution: worksforme
Status: newclosed

comment:9 Changed 3 years ago by nott

Works for me on master.

Note: See TracTickets for help on using tickets.
Back to Top