My Short Description
Project description
Prema Django
premadjango is a Python package designed to streamline the setup of new Django projects by providing default configurations and settings.
Installation
You can install premadjango via pip:
pip install premadjango
Features
Field Validators
premadjango includes a collection of Django model field validators to ensure data integrity and consistency. These validators cover common validation scenarios and help maintain data quality within your Django models.
Basic Usage
from premadjango.models.field_validators import email_validator
class MyModel(models.Model): email = models.EmailField(validators=[email_validator])
Field Converts
premadjango offers a variety of Django model field converters to transform field values into desired formats, such as lowercase, uppercase, etc. These converters help standardize data representation and facilitate data manipulation.
Basic Usage
from premadjango.models.field_converts import LowercaseCharField
class MyModel(models.Model): name = LowercaseCharField(max_length=100)
Middleware
The package includes middleware components to enhance the functionality of Django projects. One such middleware is DisableClientSideCachingMiddleware, which disables client-side caching to ensure the most up-to-date content is served to users.
Basic Usage
To disable client-side caching, add the middleware to your MIDDLEWARE setting in the Django project's settings.py file:
MIDDLEWARE = [ # Other middleware classes... 'premadjango.middleware.DisableClientSideCachingMiddleware', ]
Conclusion
With premadjango, setting up new Django projects becomes more efficient and straightforward. By leveraging its default configurations, field validators, converters, and middleware, developers can focus more on building their applications rather than configuring project settings from scratch.
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
Hashes for PremaDjango-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc82abc8d6b1e7d32e102cb460de43a39e0e7f1962737898d35e8fa4557e697b |
|
MD5 | 388a23a1162b586b2d1fd3f1861808eb |
|
BLAKE2b-256 | e864dfcf0e52da4aaccaa4fdcf5734895f1753cfe9dd95d71a818f1e67d7cfa8 |