﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16368	Custom sites model overridden by contrib.sites.model.Site	briehan.lombaard@…	nobody	"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'."	Bug	closed	contrib.sites	dev	Normal	fixed			Accepted	0	0	0	0	0	0
