Skip to main content

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

File hashes

Hashes for django-postgres-unlimited-varchar-1.1.2.tar.gz
Algorithm Hash digest
SHA256 3ddac6bc5b618341d6e2ef8b7dcc1bd737713e668e15d956dacb987019f69081
MD5 a9843623887e92944692f8cd5737e2d7
BLAKE2b-256 6d3ac7025eb237b9a331a30e1b55b595a13088890272148fb2562832d4c6efae

See more details on using hashes here.

File details

Details for the file django_postgres_unlimited_varchar-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_postgres_unlimited_varchar-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fc942e8d9ae9d9197471ea7ed96c58b2a7a301f83d88b89009df603904185738
MD5 6a7cf1ad74908d661e732a808087ba06
BLAKE2b-256 f508a0ea881d2e909bb5fa6842b8dd0e471f186030a4a57d21521176f8300202

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page