A tiny app adding support unlimited varchar fields in Django/Postgres.
Project description
A tiny app adding support unlimited varchar fields (no specified max length) in Django/Postgres.
Usage:
from django.db import models from django_postgres_unlimited_varchar import UnlimitedCharField class Person(models.Model): name = UnlimitedCharField() ...
Why?
Out of the box, Django has two fields for text:
CharField, which is for single-line text, and has a required maximum length (the max_length argument). In the database, this creates a field of type varchar(LENGTH).
TextField, which is for multi-line text, and has no maximum length. In the database, this creates a field of type text.
Clearly missing is a third type: single-line, no max length. Postgres supports this as the varchar type (note the lack of a length).
This field adds that type. AFAIK there isn’t any performance hit in using this, so it’s suitable for any situation where there isn’t a clear required max length.
Project details
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
File details
Details for the file django-postgres-unlimited-varchar-1.1.2.tar.gz
.
File metadata
- Download URL: django-postgres-unlimited-varchar-1.1.2.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.13 Darwin/21.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ddac6bc5b618341d6e2ef8b7dcc1bd737713e668e15d956dacb987019f69081 |
|
MD5 | a9843623887e92944692f8cd5737e2d7 |
|
BLAKE2b-256 | 6d3ac7025eb237b9a331a30e1b55b595a13088890272148fb2562832d4c6efae |
File details
Details for the file django_postgres_unlimited_varchar-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: django_postgres_unlimited_varchar-1.1.2-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.13 Darwin/21.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc942e8d9ae9d9197471ea7ed96c58b2a7a301f83d88b89009df603904185738 |
|
MD5 | 6a7cf1ad74908d661e732a808087ba06 |
|
BLAKE2b-256 | f508a0ea881d2e909bb5fa6842b8dd0e471f186030a4a57d21521176f8300202 |