[Answer]-Can I change content based on the URL a user has accessed the site?

1👍

Do a request.get_host check in base template and add different css accordingly:

{% if request.get_host == 'domain1.com' %}
    <link rel="stylesheet" href="{{STATIC_URL}}css/green.css">
{% else %}
    <link rel="stylesheet" href="{{STATIC_URL}}css/red.css">
{% endif %}

Or do it this way. By default show site in green theme, but allow user to change theme on front end. And then store the chosen theme in session variable theme.

{% if request.session.theme == 'green' %}

Leave a comment