Re: Is there any way to create char data type in django.

2010-04-21 Thread Huang Stanley
Finally, I find out that I can create my own datatype! (I use Django 1.2 beta 1.) in models.py: from django.db import models from django.db.models import * from django.utils.translation import ugettext_lazy as _ class myCharField(Field): def __init__(self, *args, **kwargs):

Re: Is there any way to create char data type in django.

2010-04-21 Thread derek
On Apr 20, 1:31 pm, Huang Stanley wrote: > Hi all: > > I try to find all fields but only IPAddressField is char data type, > but it's a fix-length char data type for 15 characters. > > Is there any field that I can use for this purpose. > > PS. I use django 1.2 beta 1 on

Is there any way to create char data type in django.

2010-04-20 Thread Huang Stanley
Hi all: I try to find all fields but only IPAddressField is char data type, but it's a fix-length char data type for 15 characters. Is there any field that I can use for this purpose. PS. I use django 1.2 beta 1 on Ubuntu. Thanks for your kindly assistance. regards, Stanley Huang -- You