Login

Tag "unlimited"

Snippet List

Unlimited-length CharField

Unlimited-length character fields in Postgres perform the same as limited-length fields, and the Postgres manual suggests not arbitrarily limiting these fields. Unfortunately, Django does not provide a way to access unlimited-length character fields except using TextField, which is rendered differently in forms and in the admin, and has different connotations. LongCharField is a way to avoid putting arbitrary max_length values where they aren't required. It will only work with databases that allow VARCHAR with no numeric parameters, such as Postgres. MySQL won't work.

  • text
  • field
  • postgres
  • charfield
  • length
  • max_length
  • unlimited
  • varchar
Read More

1 snippet posted so far.