FinalsClub / karmaworld

KarmaNotes.org v3.0
GNU Affero General Public License v3.0
7 stars 6 forks source link

Reexamine use of Django Sites #321

Closed btbonval closed 10 years ago

btbonval commented 10 years ago

Seth mentioned at one point that Django Sites was basically used for virtual hosting, and that ALLOWED_HOSTS in Django 1.5+ replaces it. https://github.com/FinalsClub/karmaworld/issues/163#issuecomment-30529188

Aside from that nginx handles virtual hosting.

Right now Django sites is causing #320 and probably #213 . It was the cause of #163 .

Can we determine what Django Sites adds, and if we determine it is adding nothing, can we please remove it?

AndrewMagliozzi commented 10 years ago

I have no idea what it does.

On Feb 6, 2014, at 5:29 AM, Bryan Bonvallet notifications@github.com wrote:

Seth mentioned at one point that Django Sites was basically used for virtual hosting, and that ALLOWED_HOSTS in Django 1.5+ replaces it.

163 (comment)

Aside from that nginx handles virtual hosting.

Right now Django sites is causing #320 and probably #213 . It was the cause of #163 .

Can we determine what Django Sites adds, and if we determine it is adding nothing, can we please remove it?

— Reply to this email directly or view it on GitHub.

sethwoodworth commented 10 years ago

Oh yeah. Drop it! It was to fix one minor issue, once. and AFAICT, allowed_hosts fixes the same problem

On Thu, Feb 6, 2014 at 7:51 AM, Andrew Magliozzi notifications@github.comwrote:

I have no idea what it does.

On Feb 6, 2014, at 5:29 AM, Bryan Bonvallet notifications@github.com wrote:

Seth mentioned at one point that Django Sites was basically used for virtual hosting, and that ALLOWED_HOSTS in Django 1.5+ replaces it.

163 (comment)

Aside from that nginx handles virtual hosting.

Right now Django sites is causing #320 and probably #213 . It was the cause of #163 .

Can we determine what Django Sites adds, and if we determine it is adding nothing, can we please remove it?

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com/FinalsClub/karmaworld/issues/321#issuecomment-34319885 .

charlesconnell commented 10 years ago

I know that allauth requires sites, and probably other things. So we can't just remove it entirely.

btbonval commented 10 years ago

Crap. allauth is pretty critical to all those external social media authenticators. Weirdly, this is what allauth says: "Consumer keys, tokens make use of the Django sites framework. This is especially helpful for larger multi-domain projects, but also allows for for easy switching between a development (localhost) and production setup without messing with your settings and database." https://pypi.python.org/pypi/django-allauth

Django sites fights automation to a frustrating point. The only thing it seems to hold is the domain name. Maybe we can make better use of Django sites to include port and all manner of other useful bits which are different between systems?

btbonval commented 10 years ago

I think this is an issue of Django Sites vs nginx both performing the same task and stepping on toes. I'll close this for now as there does not appear to be a good way to make them be BFFs.