Skip to main content

Djangoplicity Threaded Multihost

Project description

djangoplicity-threaded multihost provides support utilities to enable easy multi-site awareness in Django apps.

Installing Djangoplicity-Threaded-Multihost

With threaded_multihost on your PYTHONPATH, just add the Threadlocal middleware to your MIDDLEWARE_CLASSES entry in your “settings.py” file.

For example:

MIDDLEWARE_CLASSES = (
   "django.middleware.gzip.GZipMiddleware",
   "django.middleware.common.CommonMiddleware",
   "django.contrib.sessions.middleware.SessionMiddleware",
   "django.middleware.locale.LocaleMiddleware",
   "django.contrib.auth.middleware.AuthenticationMiddleware",
   "django.middleware.doc.XViewMiddleware",
   "threaded_multihost.middleware.ThreadLocalMiddleware",
   "satchmo_store.shop.SSLMiddleware.SSLRedirect",
   "django.contrib.redirects.middleware.RedirectFallbackMiddleware",
   "django.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
)

Testing

Test suite can be done by running ./manage.py test in the “tests” directory.

Contributing to djangoplicity-threaded-multihost

We are pleased to accept contributions and bugfixes for django-threaded-multihost.

To make a contribution:

  1. First fork the project from bitbucket.

  2. Build and test your addon or update. You must provide tests for us to accept your contribution, and these tests should be unit tests rather than doctests. However, doctests in models are acceptible. If you are fixing a bug, it is a good rule of thumb to provide a test which provides a regression-test against that bug.

  3. If this is a simple patch, go to django-threaded-multihost on github and enter a bug with the patch.

  4. If this is a larger patch or a new feature, make a branch and propose its merger:

    • Make a fork on bitbucket for your addition

    • Make your changes to the fork

    • Issue a pull request when it is ready for inclusion into tip.

Threaded Multihost Authors and Contributors

Core developers

Contributors

  • Herbert Poul http://sct.sphene.net, for inspiration, ideas, and the original Threadlocals we have heavily modified.

  • Dirk Datzert <dirk@datzert.de> for contributing the initial test suite and the UserField/CreatorField/EditorField in fields.py

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

File details

Details for the file djangoplicity_threaded_multihost-1.4.post2-py3-none-any.whl.

File metadata

  • Download URL: djangoplicity_threaded_multihost-1.4.post2-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for djangoplicity_threaded_multihost-1.4.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 679adbb2c7c15bf8f13ee789c8669fd71170b3937b6ac9b74e8dc8e25bc2a93c
MD5 55d183af71246c6abdd1aab33994e2ee
BLAKE2b-256 227bcacd1d107e5918603eb3fb8e52dc16b9481c6ee33005c32411ed5d545269

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