Opened 17 years ago

Closed 17 years ago

#5532 closed (duplicate)

Adding user via admin site doesn't work if TEMPLATE_STRING_IF_INVALID is defined

Reported by: Raphaël Hertzog <raphael@…> Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I use TEMPLATE_STRING_IF_INVALID during development to catch quickly errors in my templates. However this breaks the "Add user" functionality of the admin interface. That's because "form_url" is not defined in the template parameters of user_add_stage in
django/contrib/admin/views/auth.py ... and thus the template creates a form with a bad action parameter (instead of letting the parmater empty).

There might be other similar instances elsewhere in the code, I haven't checked.

--- tmp/auth.py 2007-09-18 16:04:46.000000000 +0200
+++ django/contrib/admin/views/auth.py  2007-09-18 16:00:32.000000000 +0200
@@ -30,6 +30,7 @@
     return render_to_response('admin/auth/user/add_form.html', {
         'title': _('Add user'),
         'form': form,
+        'form_url': '',
         'is_popup': '_popup' in request.REQUEST,
         'add': True,
         'change': False,

Change History (2)

comment:1 by Ramiro Morales, 17 years ago

Other previous similar reports have been closed as duplicates of #3579. Considering the admin app in it's current form is being deprecated and no effort is being put in doing large scale bugfixes, I suspect this reliance in empty a TEMPLATE_STRING_IF_INVALID value won't be fixed.

I don't know if this also applies to newforms-admin though.

comment:2 by James Bennett, 17 years ago

Resolution: duplicate
Status: newclosed

Going to close this as a dupe of #3579.

Note: See TracTickets for help on using tickets.
Back to Top