News for hackers. Stuff that matters.
Re:Using subdomains (e.g. http://XYZ.someserver.com) with dj... by niels on Tuesday October 21, 2008 @10:50AM (#338950)
Why should django deal with subdomains. Just use mod_rewrite or whatever your server offers to map your internal urls. myname.mydomain.com -> mydomain.com/myname/
Re:Using subdomains (e.g. http://XYZ.someserver.com) with dj... by jonknee on Tuesday October 21, 2008 @11:13AM (#338971)
It's much cleaner to have it taken care of in Django than through mod_rewrite. For one all of your URL routing will still work. In your setup using {% url %} or reverse() wouldn't work.
Re:Using subdomains (e.g. http://XYZ.someserver.com) with dj... by whalesalad on Tuesday October 21, 2008 @12:27PM (#339043)
Yeah I agree here. Putting that inside of your application and outside your web server config makes more sense to me. Especially using the reverse url matching, which is so amazingly wonderful (especially when you give your url's unique names like user-account-settings and can simply do {% url user-account-settings %} and be done with it). Hat tip to obeattie.com for all my django template ramblings above ;)