Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support multisite switch via domain name #873

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Sep 13, 2024

Overview

Allow switching between multiple sites via domain name.

Related

Idea for a solution to TUP-706.

Changes

  • added middleware
  • added example settings for middleware

Testing

  1. Be able to access a server at multiple domains e.g.
  2. In custom_app_settings.py, add new middleware to CUSTOM_MIDDLEWARE e.g.
    CUSTOM_MIDDLEWARE = ['taccsite_cms.middleware.settings.SiteIdMiddleware']
  3. Set current CMS SITE to one of those domain names e.g.
    • Domain name: 0.0.0.0:8000
    • Display name: 0.0.0.0:8000
  4. Create new CMS SITE with the other domain names e.g.
    • Domain name: localhost:8000
    • Display name: localhost:8000
  5. Visit 0.0.0.0:8000.
  6. Create/View a unique page.
  7. Visit localhost:8000.
  8. Create/View a unique page.
  9. Switch between the sites using URL.
  10. Verify each site only shows its unique page.

Note

You may need to reload page after site/domain switch to refresh the CMS toolbar output.

UI

Sites (Admin) 0.0.0.0:8000 localhost:8000
multisite via domain - sites multisite via domain - 0000 multisite via domain - localhost
multisite.via.domain.mov

@wesleyboar wesleyboar added feature A new feature or replacement of present feature effort S Small effort task (~½ a week) — does not include review time proposal Proposal or request for new task labels Sep 13, 2024
@wesleyboar wesleyboar marked this pull request as ready for review September 13, 2024 21:22
wesleyboar added a commit that referenced this pull request Sep 13, 2024
I do not think it is a useful solution for TUP-706.

The code/feature is archived in #873:
#873
wesleyboar added a commit that referenced this pull request Sep 13, 2024
I do not think it is a useful solution for TUP-706.

The code/feature is archived in #873:
#873
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort S Small effort task (~½ a week) — does not include review time feature A new feature or replacement of present feature proposal Proposal or request for new task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant