This project aims to provide commonly used building blocks for Django projects and applications.
Current features:
TestCase mixins to ease the process of testing views via self.client.get
A JSONResponseMixin
New generic class based view DetailViewWithPostAction which is able to handle custom post actions.
Template filter to provide field’s verbose names
Template tag for displaying the currently selected main navigation item
Custom test_email_backend that sends emails to your own address no matter who the recepient is
Functions to test callable or non-callable views
Dummy views to test your 404 and 500 templates
RapidPrototypingView to render any template even when it has no view hooked up in urls.py.
AjaxRedirectMiddleware for jQuery AJAX calls that return 301 redirects
AjaxResponseMixin for views that can return their normal template or a partial template when it is an ajax call
AccessMixin which allows to use views with the login_required decorator based on a setting.
A context processor to add your analytics tracking code to your template context.
A decorator lockfile for wrapping handle methods of admin commands so that they never run twice at the same time.
A getCookie js function that can be used to retrieve the csrf token for AJAX POST requests.
A templatetag call which allows to call any method with params.
Utilities for loading classes from a string like myproject.models.Foobar.
Form, which add field labels as placeholder attributes.
Function to convert html code into formatted plain text.
Amazon S3 storage + django-compressor support files.
An AJAX View to display paginated comments for every possible object.
Tools to improve django-hvad
Installation
To get the latest stable release from PyPi:
$ pip install django-libs
To get the latest commit from GitHub:
$ pip install -e git://github.com/bitmazk/django-libs.git#egg=django_libs
Usage
See the docs folder for descriptions of the different tools this project provides.
Or read the docs here: http://django-libs.readthedocs.org/en/latest/
Contribute
If you want to contribute to this project, please perform the following steps:
# Fork this repository # Clone your fork $ mkvirtualenv -p python2.7 django-libs $ pip install -r requirements.txt $ git co -b feature_branch master # Implement your feature and tests $ git add . && git commit $ git push -u origin feature_branch # Send us a pull request for your feature branch
Metadata
Release files for django-libs 2.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-libs-2.0.3.tar.gz | 126.8 kB | Without provenance | Details for django-libs-2.0.3.tar.gz |
Release files / django-libs-2.0.3.tar.gz
| Download URL | django-libs-2.0.3.tar.gz |
|---|---|
| Size | 126.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8dd873abaa07152d690310ab62cf941c1d7d752abfdf4a4bbc3d973bcf2c858
|
|
BLAKE2b-256 checksum How to use checksums |
0b971e193831953a6e61baf7a8b283765882a98d6723cfced18852384e2f26de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
|
Security for django-libs 2.0.3
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.