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.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

feincms3_language_sites-0.0.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: feincms3_language_sites-0.0.2.tar.gz
  • Upload date:
  • Size: 8.4 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.2.tar.gz
Algorithm Hash digest
SHA256 f64169b7b68a63828bd7c59ec11316fcecef6d4fbc7c8fecc4c96220dac2a7d2
MD5 7d76c98c0465aca42d14da503c86516d
BLAKE2b-256 87066cfbbe861607286b41a07ee82ab68a7c6ec4a4c6f8b85e61696e1d49292a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: feincms3_language_sites-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b3a8d421b37864e9a65c8410b41d049749a0e50420e6542f32ea41b7d5035594
MD5 f6ce5720273e40dadef14a1ea6f855be
BLAKE2b-256 f565495f0bc297a1fc32c1fc10414581c8f45e6d70f8587ed62b0ebe824b0ea6

See more details on using hashes here.

Supported by

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