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.4.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for django_suc-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f8abb5ae17a8dad70c0d7ade813b7e1e6f87ed6b95ab710be4d6a12d19bd86b |
|
MD5 | 9ae1cd7b8c16fb2c78efa48e051e6d9e |
|
BLAKE2b-256 | fbf512ce1e26a304af30422b69d7c85cf5820b909d6534e681ac96855f69a940 |