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

django-postgres-unlimited-varchar-1.1.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-postgres-unlimited-varchar-1.1.0.tar.gz.

File metadata

File hashes

Hashes for django-postgres-unlimited-varchar-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fab9d0208565c092dca75036615b4475e0bb0c1d3b61ffef6345345943de0dd6
MD5 78ca6aa91b258ca574bf629fcb84af5c
BLAKE2b-256 d16387f0d55561b8e994abb2b83ab98ff061d176f6a77ec9450839e90f97aefe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_postgres_unlimited_varchar-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2aa044613906c43abb94aef4df8e205400c4643e5bd77efe5e6fe0593c05045
MD5 6a478b6969ccdce14463c03c3b3ba1d7
BLAKE2b-256 c68672e6bd95b4ff7538a5253aec746f15be89412b00c9c02835a550d44cf854

See more details on using hashes here.

Supported by

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