Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install django-stringfield

How to install django-stringfield

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install django-stringfield
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.3.0 Available View build log
0.2.3 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
0.2.0 Available View build log
0.1.5 Available View build log
0.1.3 Available View build log
0.1.2 Available View build log
Windows (64-bit)
0.3.0 Available View build log
0.2.3 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
0.2.0 Available View build log
0.1.5 Available View build log
0.1.3 Available View build log
0.1.2 Available View build log
Mac OS X (10.5+)
0.3.0 Available View build log
0.2.3 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
0.2.0 Available View build log
0.1.5 Available View build log
0.1.3 Available View build log
0.1.2 Available View build log
Linux (32-bit)
0.3.0 Available View build log
0.2.3 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
0.2.0 Available View build log
0.1.5 Available View build log
0.1.3 Available View build log
0.1.2 Available View build log
Linux (64-bit)
0.3.0 Available View build log
0.2.3 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
0.2.0 Available View build log
0.1.5 Available View build log
0.1.3 Available View build log
0.1.2 Available View build log
 
License
BSD
Imports
Lastest release
version 0.3.0 on Nov 28th, 2011

A field intended for strings that typically has a length less than 500 characters. django-stringfield tries to not to enforce length on database level if possible but different databases have different limitations. Currently implemented as:

PostgreSQL
character varying
MySQL
VARCHAR (65528) [1]
Oracle
VARCHAR2 (4000)
SQLite & Other backends
TEXT

Installation

pip install django-stringfield

Usage

You use this just like the normal django.db.models.CharField except that the key word argument max_length works a little differently:

  • It is optional and defaults to 500
  • It only enforces max length on the default formfield not on the database.

Example:

# models.py
from stringfield import StringField

class MyModel(models.Model):
    name = StringField()
[1]MySQL >= 5.0.3 should be able to handle a maximum length of 65535 but that does not work in my empirical testing using mysql 5.1.41 where 65528 is the maximum considering NULL and NOT NULL.

Subscribe to package updates

Last updated Nov 28th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.