I think you should map first the form to an object and then access the
name attribute of that object instance. It seems that you are trying
to access a model.CharField() directly.

On 18 jun, 00:43, redmonkey <[EMAIL PROTECTED]> wrote:
> I have two fields in a model, a name (CharField) and a description
> (TextField). I'm trying to set the default description to be something
> simple like:
>
> default="hello, I'm the description of the %s" % name
>
> (To my surprise) this validates, but the description includes a
> reference to the name field, not it's value, resulting in:
>
> "hello, I'm the description of the <django.db.models.fields.CharField
> object at 0x1074db0>"
>
> I want to get an affect similar to that of prepopulate_from, but
> Django's documentation isn't being that useful. Is there no
> [field].value property? Can anyone help me out?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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