#16368: Custom sites model overridden by contrib.sites.model.Site
--------------------------------+-------------------------------
 Reporter:  briehan.lombaard@…  |          Owner:  nobody
     Type:  Bug                 |         Status:  new
Milestone:                      |      Component:  contrib.sites
  Version:  1.3                 |       Severity:  Normal
 Keywords:                      |   Triage Stage:  Unreviewed
Has patch:  0                   |  Easy pickings:  0
    UI/UX:  0                   |
--------------------------------+-------------------------------
 We have a custom 'sites framework' implementation that basically consists
 of a Site model and SiteManager. For some reason, when running our
 application, the Site model from django.contrib.sites is used instead of
 our own.

 I did the following from within the app:


 {{{
 from myapp.sites.models import Site
 print Site.objects

 <class 'django.contrib.sites.models.Site'>
 }}}


 When doing the same from the management shell (./manage.py shell), I get
 the expected output:


 {{{
 >>> from myapp.sites.models import Site
 >>> type(Site.objects)

 <class 'foobar.sites.models.Site'>
 }}}


 Our application used to run fine on Django 1.0 and subsequently on 1.1 and
 1.2 during my current upgrade attempt to get the application onto version
 1.3. I also tried this using the current trunk (revision 16483) and got
 the same result.

 I'm attaching a minimal Django project that replicates this behavior on my
 machine. You will see that running ./manage syncdb actually creates a
 'django_site' table instead of 'sites'.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16368>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to