Multisite support for feincms3
Project description
Multisite support for feincms3.
This app allows running a feincms3 site on several domains, with separate page trees etc. on each (if so desired).
The default behavior allows to match a single host. The advanced options fieldset in the administration panel allows specifying your own regex, which is matched against the host. There can be at most one default site.
Installation and usage
pip install feincms3-sites
Add feincms3_sites to INSTALLED_APPS and run ./manage.py migrate
Your page model should extend feincms3_sites.models.AbstractPage instead of feincms3.pages.AbstractPage. The only difference is that our AbstractPage has an additional site foreign key, and path uniqueness is enforced per-site.
If you’re using feincms3 apps currently, replace feincms3.apps.AppsMiddleware with feincms3_sites.middleware.AppsMiddleware in your MIDDLEWARE. Otherwise, you may want to add feincms3_sites.middleware.SiteMiddleware near the top.
Uses of apps_urlconf() in your own code (improbable!) have to be replaced by feincms3_sites.middleware.apps_urlconf_for_site(site).
Page.objects.active() does not automatically filter by site, you’ll have to do this yourself in your views code, navigation template tags etc. The site instance (if any could be found) is always available as request.site.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file feincms3-sites-0.1.1.tar.gz
.
File metadata
- Download URL: feincms3-sites-0.1.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56a26b4967b05b9a86a4b00a2d109ec5e041f2a8ba9f08e3a5bd95006e94aae4 |
|
MD5 | 71d3181c61a33a39ef74437c54c475e0 |
|
BLAKE2b-256 | 6de51cdf578458b6a4c8ef2e5d04e71122e82dc8075829567728076f00513cfc |
File details
Details for the file feincms3_sites-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: feincms3_sites-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c23a1f89154638738da166387025566cd5fceb2261860dfa7741c8fa5c5db2c7 |
|
MD5 | 3078092f366940817b41f2d4110d3b23 |
|
BLAKE2b-256 | 215848a732eb624349b8fcd4d5c69b89d4ba3a29eb3876e4083c215b24553004 |