for the charfield there is a max_length, but for what you are trying
to do, you need to set this in the form widget.  Take a look at
newforms documentation but to point you in the right direction you
need to do something like:
where f is your form
f.base_fields['FIELDNAME'].widget.attrs = {'size' : 500}
which will set the FIELDNAME input with 500 columns

for the imagefile entered by it should be
entered_by = models.ForeignKey(User, related_name = 'user_entered') or
whatever you want to call it.
-richard


On Sep 15, 12:49 pm, Hai Dong <[EMAIL PROTECTED]> wrote:
> Hello:
>
> I am trying to control the html display size of a CharField using length
> keyword. However, I got the following error when doing syncdb
>
> __init__() got an unexpected keyword argument 'length'
>
> I am using django svn release. I didn't find length keyword in django
> document, but learned it from the django usergroup.
>
> Another question is in my data model I have
> entered_by = models.ForeignKey(User)
>
> when doing syncdb I got the following where imagefile is a table name.
> Accessor for field 'entered_by' clashes with related field
> 'User.imagefile_set'. Add a related_name argument to the definition for
> 'entered_by'.
>
> Thanks,
> Harry


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to