Module for auto-naming unique constraint.
Project description
django-suc spares you from manually assigning a unique name to a constraint
Installation
You can install django-suc by using pip:
$ pip install django-suc
Quickstart
In your apps.py:
from django_suc import SmartAppConfig
class MyAppConfig(SmartAppConfig):
...
In your models.py:
from django.db import models
from django_suc import SmartUniqueConstraint
class MyClass(models.Model):
...
class Meta:
constraints = [
SmartUniqueConstraint(fields=['field1', 'field2']),
]
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
django-suc-0.0.3.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for django_suc-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d308a0ac17a72197601a69409cd09bd5413ceb5d48e9b01a9e9031b2565899ef |
|
MD5 | d07a90bd2f8bc69828ef119454d79d46 |
|
BLAKE2b-256 | fd7b27319c2d0d42d83edd8819365df92557dc9997266822241cb9c674c209de |