Overview
Django-common consists of the following things:
A middleware that makes sure your web-app runs either on or without ‘www’ in the domain.
A SessionManagerBase base class, that helps in keeping your session related code object-oriented and clean! See session.py for usage details.
An EmailBackend for authenticating users based on their email, apart from username.
Some custom db fields that you can use in your models including a UniqueHashField and RandomHashField.
Bunch of helpful functions in helper.py
A render_form_field template tag that makes rendering form fields easy and DRY.
A couple of dry response classes: JsonResponse and XMLResponse in the django_common.http that can be used in views that give json/xml responses.
Installation
Install django_common (ideally in your virtualenv!) using pip or simply getting a copy of the code and putting it in a directory in your codebase.
Add django_common to your Django settings INSTALLED_APPS:
INSTALLED_APPS = [ # ... "django_common", ]Add the following to your settings.py with appropriate values:
IS_DEV
IS_PROD
DOMAIN_NAME
WWW_ROOT
Add common_settings to your Django settings TEMPLATE_CONTEXT_PROCESSORS:
TEMPLATE_CONTEXT_PROCESSORS = [ # ... "common_settings", ]Add EmailBackend to the Django settings AUTHENTICATION_BACKENDS:
AUTHENTICATION_BACKENDS = ( 'django_common.auth_backends.EmailBackend', 'django.contrib.auth.backends.ModelBackend' )Add WWWRedirectMiddleware if required to the list of middlewares:
MIDDLEWARE_CLASSES = [ # ... "WWWRedirectMiddleware", ]
This open-source app is brought to you by Tivix, Inc. ( http://tivix.com/ )
Metadata
Release files for django-common-tivix 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django-common-tivix-0.1.2.linux-i686.tar.gz | Details for django-common-tivix-0.1.2.linux-i686.tar.gz |
Release files / django-common-tivix-0.1.2.linux-i686.tar.gz
| Download URL | django-common-tivix-0.1.2.linux-i686.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
822defe276c33fd0d8e4726fdb77f33caaca696abbbbb7afa4c74246d9830cab
|
|
BLAKE2b-256 checksum How to use checksums |
850a8f519dd7d267167fa6bdc8295c4b7706d2bcd18badb960d4379e6154e389
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-common-tivix 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.