Swathi Swathi
Swathi Swathi

Reputation: 57

How to get long text field in django models 1.3 with sql 2005

what is the field name that should be given in the models to get long text field. I'm using django 1.3 and sql 2005

Upvotes: 2

Views: 4146

Answers (2)

Tomáš Plešek
Tomáš Plešek

Reputation: 1492

If you need longer text then this should help:

your_field = models.TextField("your field name")

see: https://docs.djangoproject.com/en/dev/ref/models/fields/#textfield

Upvotes: 1

kartheek
kartheek

Reputation: 6704

in your model write this

name = models.CharField(max_length=200)

links

1)for reference visit this.

2)and this might be usefull

Upvotes: 2

Related Questions