RunTimeError when saving via admin
hdn8 opened this issue · 6 comments
At first attempt of using this app I got an error when saving an instance (with Accept, Force Accept, Reject..):
RuntimeError at /admin/registration/registrationprofile/1/None
Obviously there's some parameter that's not being resolved in the url. In the admin list page the bulk function works however, so until I have time to look into what's happening in the instance save method, the bulk action will have to do. As I get more information on it I'll add it to the issue.
Thanks for you report. Well, I'm not sure but maybe the issue is related to Supplemental Information explained at https://django-inspectional-registration.readthedocs.org/en/latest/about_registration_supplement.html
I'm sorry I built it a long time ago so I can't remember the detail. I'll check it out when I got time so would you tell me the detail?
Hello sir,
Did you check this error?
Can I somehow debug it?
One quick question :Is none the form_url
?
/admin/registration/registrationprofile/1/None
I believe the problem is the action assigned to the form:
<form class="form-horizontal" enctype="multipart/form-data" action="None" method="post"
....
...
Helpful information:
{'add': False, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x10c89f210>, 'app_label': 'registration', 'change': True, 'content_type_id': 7, 'errors': [], 'form_url': 'None', 'has_absolute_url': False, 'has_add_permission': False, 'has_change_permission': True, 'has_delete_permission': False, 'has_file_field': True, 'inline_admin_formsets': [], 'is_popup': False, 'media': <django.forms.widgets.Media object at 0x10c89f3d0>, 'object_id': u'1', 'opts': <Options for RegistrationProfile>, 'ordered_objects': [], 'original': '<<triggers database query>>', 'save_as': False, 'save_on_top': False, 'title': u'Change registration profile'} {'csrf_token': <django.utils.functional.__proxy__ object at 0x10c89f590>} {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x10c8a5890>, 'user': <django.utils.functional.SimpleLazyObject object at 0x10c89f2d0>} {'debug': True, 'sql_queries': '<<sql_queries>>'} {'LANGUAGES': '<<languages>>', 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'en-us'} {'MEDIA_URL': ''} {'STATIC_URL': '/static/'} {'request': '<<request>>'} {'login_form': <django.contrib.auth.forms.AuthenticationForm object at 0x10c8a5690>}
Thanks for the plugin,
George
Temporary Solution:
<form class="form-horizontal" {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
Just replace action="{{ form_url }}"
with action
in django.contrib.admin.templates.admin.change_form.html
Hello,
How to fix this bug? I'm not understand :(
In django.contrib.admin.templates.admin.change_form.html action="{{ form_url }}"
Django 1.4.5
Thanks.
Sorry guys. I forgot about this and haven't noticed that the issue was updated.
Let me give a time to fix it. I'm working on this issue now.
I think I fixed it. I (quickly) tested with Django 1.5.1