Hacker News new | past | comments | ask | show | jobs | submit login

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/



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.


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 ;)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: