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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-suc-0.0.4.tar.gz.
File metadata
- Download URL: django-suc-0.0.4.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02657462348c5673d4b7693ccdfd539ef9c0b1ba4fdb4d972e7bd0d05944fee8
|
|
| MD5 |
a878f990c24e9ef291a945aaacdaefb2
|
|
| BLAKE2b-256 |
6cd977b9e8d6ceb9cb986c6e84bd4c4039d9f9bfd95c26182add7e3a0ed6b0ad
|
File details
Details for the file django_suc-0.0.4-py3-none-any.whl.
File metadata
- Download URL: django_suc-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f8abb5ae17a8dad70c0d7ade813b7e1e6f87ed6b95ab710be4d6a12d19bd86b
|
|
| MD5 |
9ae1cd7b8c16fb2c78efa48e051e6d9e
|
|
| BLAKE2b-256 |
fbf512ce1e26a304af30422b69d7c85cf5820b909d6534e681ac96855f69a940
|