Thank you, guys.
for the charfield question, what I am trying to modify is the backend.
So I need to change django.contrib.admin.views.main.add_stage? and
also change_stage function?
I don't know how to change that function. Is there a way to do it
during model definition?
Thanks,
Harry
On Sep 15, 6:38 pm, r_f_d <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---