There's an open ticket currently regarding custom error messages in
newforms: http://code.djangoproject.com/ticket/3457
I currently have an ugly hack in place that gives me an error_message=
parameter for the field types I use, but, it's ugly, and doesn't work
entirely. I'm working on getting a r
If an "error" class is going to be added, we might as well take the
leap and add a "required" class, too.
On Feb 15, 7:12 pm, "Brian Morton" <[EMAIL PROTECTED]> wrote:
> I don't know if this has been suggested yet, but has anyone considered an
> enhancement to newforms to optionally allow a field
Ticket #2868 is still unreviewed. It has a patch that adds a
"runscript" option to manage.py so you can easily do:
./manage.py runscript my-script.py
I see it as assigned to Adrian, but that was pre-ticket triage change,
so I'm not really sure the status of the ticket.
Thanks!
--~--~-
I actually just ran into this problem. I was assuming that if my
form's clean() hook were called, that clean_data would have at the
very least empty entries for the already-validated fields. In my case,
I don't need to do complex validation (database hits) unless the
previous fields are valid, and
Given a form:
class MyForm(Form):
field = CharField()
def clean(self)
if self.clean_data["field"] != "foo":
raise ValidationError("Field must be 'foo'")
In the template, it is impossible to directly address the magic
"__all__" field:
{{ form.errors.__all__ }}
Variab