On Jun 26, 3:09 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Mon, 2007-06-25 at 08:22 -0700, AnaReis wrote:
> > Hi,
> > I was trying to change the way in which the errors are presented in a
> > form.
> > I tried to put them in:
> > <tr><td align="center"><b>{{field.label}}:</b></td><td>{{field}}{% if
> > field.field.required %}<span class="highlight">*</span>{%endif%}</
> > td>{%if field.errors%}<td><span class="highlight">{{field.errors}}</
> > span></td>{%endif%}</tr>
> > but I still get them formatted as an <ul> and I would like the errors
> > to appear as simple text..
>
> I'm beginning to suspect this is a slight design flaw in newforms: the
> presentation of error messages is hard-coded into the way the ErrorList
> class (in newforms.utils) is used in the HTML rendering.
>
> I can think of a couple of backwards-compatible ways we might be able to
> change this. I'll bounce some ideas of the developers list.
>
> > I tried these instructions in this page:
> >http://code.djangoproject.com/wiki/TemplatedForm
> > But I can't seem to make it work..
> > I have this error on my models.py: Exception Value:        name
> > 'TemplatedForm' is not defined
> > I understand that I have to import something, I just don't know how to
> > import it...
>
> You have to import TemplatedForm from whichever file you defined it in.
> Both TemplatedForm and the new form subclass you are creating are just
> classes in your Python code. Import them as you would any othre class in
> Python.
>
> Regards,
> Malcolm
>
> --
> How many of you believe in telekinesis? Raise my 
> hand...http://www.pointy-stick.com/blog/

I wrote another response but it's been 2h or more and it doesn't show
here so I'll post it again... Sorry if this is repeated...

I'm kind of a noob on these python things and I don't know very well
how to handle these path things.
The file where TemplatedForm is, newforms.py, is in this directory:
/nobackup/reis/Project/Manager/utils

The import on my file is:
from Manager.utils.newforms import TemplatedForm

I have this error:
Exception Value:        No module named utils.newforms

What am I doing wrong and why? Do I have to put something in the
settings file?
Sorry for the lameness...
Regards.


--~--~---------~--~----~------------~-------~--~----~
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