Code

Opened 7 years ago

Closed 6 years ago

#5620 closed (duplicate)

XMLField not working

Reported by: anonymous Owned by: nobody
Component: Forms Version:
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

As described in
http://www.djangoproject.com/documentation/model-api/#xmlfield it
should validate its content with a RelaxNG schema, but it is simply
not working (is this newforms-admin specific?) Its dependency on JING
should also be documented in the model-api document. BTW: why not use
lxml? (http://codespeak.net/lxml/)

Attachments (3)

newforms_xmlfield.diff (1.9 KB) - added by teepark 6 years ago.
recycles the oldforms XMLField validation for newforms
newforms_xmlfield2.diff (2.0 KB) - added by teepark 6 years ago.
newforms_xmlfield.diff3 (2.0 KB) - added by teepark 6 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 in reply to: ↑ description Changed 6 years ago by David Danier <goliath.mailinglist@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Replying to anonymous:

BTW: why not use
lxml? (http://codespeak.net/lxml/)

Tried to get that into django, too:
http://code.djangoproject.com/ticket/3094#comment:4

comment:2 Changed 6 years ago by anonymous

lxml instead of Jing would be nice since Jing seems to be dead and isn't very effective IMHO.

comment:3 follow-up: Changed 6 years ago by jacob

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #3094.

comment:4 in reply to: ↑ 3 Changed 6 years ago by teepark

  • Component changed from Admin interface to django.newforms
  • Resolution duplicate deleted
  • Status changed from closed to reopened

#3094 is about adding other validation methods besides Jing, starting with lxml. This ticket addresses the problem that the Jing-based validation we already have is oldforms-only. XMLField will need to override formfield(), providing a custom newforms.fields.Field subclass that uses core.validators.RelaxNGCompact.

Changed 6 years ago by teepark

recycles the oldforms XMLField validation for newforms

Changed 6 years ago by teepark

Changed 6 years ago by teepark

comment:5 Changed 6 years ago by jacob

  • Resolution set to duplicate
  • Status changed from reopened to closed

Nah, the newforms-admin solution will be to implement #3094; this is still a dup.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.