Skip to main content

Multisite support for feincms3

Project description

CI Status

Multisite support for feincms3.

  • Extend feincms3_language_sites.models.AbstractPage instead of feincms3.pages.AbstractPage. This abstract page already extends feincms3.mixins.LanguageAndTranslationOfMixin so you do not have to use the mixins adding a language field to the page.

  • Replace the LocaleMiddleware with feincms3_language_sites.middleware.site_middleware

  • Optionally add feincms3_language_sites.middleware.redirect_to_site_middleware if you want to enforce the host. The SECURE_SSL_REDIRECT is also respected. The redirect_to_site_middleware has to be added before the SecurityMiddleware to work correctly.

  • Add some configuration for feincms3-language-sites

Possible configuration:

SITES = {
    "de": {
        "host": "127.0.0.1:8000",
        "host_re": r"example\.com$|127.0.0.1:8000$",
    },
    "fr": {
        "host": "localhost:8000",
    },
}

Note that Page.objects.active() only returns pages in the current language. If you want to generate translation links (e.g. using ...|translations in a template) you do not want to use the .active() queryset method but build something yourself which runs .filter(is_active=True).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feincms3_language_sites-0.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

feincms3_language_sites-0.0.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file feincms3_language_sites-0.0.1.tar.gz.

File metadata

  • Download URL: feincms3_language_sites-0.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for feincms3_language_sites-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4bf0d38ef97e9c820b7cc2730c09c4803ccf9790d2122cc9d2ec52fab0dbc001
MD5 979ade2a692de2438295adb2e392809b
BLAKE2b-256 4ac58e38d995f52acd5fee09e89d7e704987aa28095c95d46be2ddd7814da156

See more details on using hashes here.

File details

Details for the file feincms3_language_sites-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: feincms3_language_sites-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for feincms3_language_sites-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6eef7c010981c03c876d422d44ef9e2a3aa8c63d6388330171d221ed7cae7710
MD5 c918bd27855053e05add7268bcf81c5c
BLAKE2b-256 1399319abdadc25c03b3869fdcea183adf37ab4c4eca51b76509b69a4afb5694

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page