views:

38

answers:

2

text_field = models.CharField(max_length=max) can I do this? I am using postgresql 8.4.

Thanks

A: 

What you have there should do the trick. What issues are you seeing?

class MyModel(models.Model):
    text = models.CharField(max_length=100)

If you're looking for a text blob, use:

text = models.TextField()
xyld
well this will create a field with data type varchar(100). I want to create a field with data type 'text'. Ex: fieldname(text)
iHeartDucks
+2  A: 

You want to use the type TextField. Like this:

text_field = models.TextField()
Jason Webb