项目作者: nnseva

项目描述 :
The tiny library introducing CharField with unlimited maximum length
高级语言: Python
项目地址: git://github.com/nnseva/django-unlimited-char.git
创建时间: 2020-05-26T16:50:20Z
项目社区:https://github.com/nnseva/django-unlimited-char

开源协议:GNU Lesser General Public License v3.0

下载


Tests with Django v2-v3

Tests with Django v3-v4

Django-Unlimited-Char

The tiny library introducing CharField with unlimited maximum length.

Installation

Stable version from the PyPi package repository

  1. pip install django-unlimited-char

Last development version from the GitHub source version control system

  1. pip install git+git://github.com/nnseva/django-unlimited-char.git

Compatibility restrictions

NOTICE Not all database backends support this feature. At the moment this is
PostgreSQL and SQLite. The Oracle backend supports such a field (not checked yet) partially only.

Using

  1. from django.db import models
  2. from unlimited_char.fields import CharField
  3. class MyModel(models.Model):
  4. name = CharField()
  5. ...

You can use this field anywhere the usual CharField is used.

You can assign a max_length attribute as for the original CharField, but this attribute will
restrict the input only (form clean() etc). The direct save() will not restrict the field length.