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.
Release files for django-postgres-unlimited-varchar 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-postgres-unlimited-varchar-1.1.2.tar.gz | 1.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_postgres_unlimited_varchar-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.8 kB
Release files / django-postgres-unlimited-varchar-1.1.2.tar.gz
| Download URL | django-postgres-unlimited-varchar-1.1.2.tar.gz |
|---|---|
| Size | 1.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ddac6bc5b618341d6e2ef8b7dcc1bd737713e668e15d956dacb987019f69081
|
|
BLAKE2b-256 checksum How to use checksums |
6d3ac7025eb237b9a331a30e1b55b595a13088890272148fb2562832d4c6efae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.9.13 Darwin/21.4.0
|
Release files / django_postgres_unlimited_varchar-1.1.2-py3-none-any.whl
| Download URL | django_postgres_unlimited_varchar-1.1.2-py3-none-any.whl |
|---|---|
| Size | 2.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc942e8d9ae9d9197471ea7ed96c58b2a7a301f83d88b89009df603904185738
|
|
BLAKE2b-256 checksum How to use checksums |
f508a0ea881d2e909bb5fa6842b8dd0e471f186030a4a57d21521176f8300202
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.9.13 Darwin/21.4.0
|