Sunday, June 3, 2018

Sponsor subdomain pointing to part of our Django site?

Hi,

I'm wondering if it is possible to use a subdomain of a sponsor's url as an alias to a particular part of our Django site?

Our Django site has urls of the form: "site.url/year/slug/*" where "*" represents a large set of child pages for various data reports and update actions related to a particular race. Here's an example: https://ontheday.net/2017/pescadero/

What we would like is for an alias of the form: "subdomain.sponsor.url/" to reference "ontheday.net/year/slug/" and work just the same as if we are accessing the site using our standard url. This includes updating links displayed in our pages that are viewed using the sponsor subdomain.

I see I might want to do some inspection of the incoming url which points me in the direction of the sites framework and django-hosts: https://github.com/jazzband/django-hosts. Also, a second SSL certificate is likely to be required.

Any advice on how I can accomplish this? Any particular things I would need to do in the Django project to make this possible?

Many thanks!
Richard

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/adb3d539-ecc5-456d-9807-b7894df8768d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment