Django model help text into database comment field

489 views
Skip to first unread message

phillipe....@ldccomex.com.br

unread,
Oct 27, 2014, 12:40:20 PM10/27/14
to django...@googlegroups.com
Hello

I would like to add help_text field value into the related database comment field.
Is that possible?


MODEL Table

field = models.CharField(help_text=u'help text content', max_length=100, unique=False, blank=True, null=True)

DATABASE

Table field comment = help text content


Cheers,
Phillipe

Collin Anderson

unread,
Oct 29, 2014, 1:22:52 PM10/29/14
to django...@googlegroups.com
Hi Phillipe,

You'll likely need to run the SQL to update the comment by hand.

You can get the data from your models like this:

for field in MyModel._meta.fields:
   
print field.attname, field.help_text

Collin

Reply all
Reply to author
Forward
0 new messages