Opened 17 years ago
Closed 17 years ago
#5919 closed (fixed)
6655 formset update makes adding imposible (when model have inlines)
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | newforms-admin |
Severity: | Keywords: | inline add | |
Cc: | alx.gsv@…, akaihol+djtick@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
From 6654 to 6655 there were changes in the branch:
U django/newforms/models.py A tests/modeltests/model_formsets A tests/modeltests/model_formsets/__init__.py A tests/modeltests/model_formsets/models.py
Since 6655 i can't add new objects of models that have inlines
options. When options without intlines
it is all right.
Error is:
TypeError at /admin/gmaps/point/add/ __init__() takes at least 2 arguments (1 given) Request Method: GET Request URL: http://localhost:8000/admin/gmaps/point/add/ Exception Type: TypeError Exception Value: __init__() takes at least 2 arguments (1 given) Exception Location: /home/longman/django-svn/newforms-admin/django/contrib/admin/options.py in add_view, line 505 Python Executable: /usr/bin/python Python Version: 2.5.1
Traceback:
Traceback (most recent call last): File "/home/longman/django-svn/newforms-admin/django/core/handlers/base.py" in _real_get_response 81. response = callback(request, *callback_args, **callback_kwargs) File "/home/longman/django-svn/newforms-admin/django/contrib/admin/sites.py" in root 136. return self.model_page(request, *url.split('/', 2)) File "/home/longman/django-svn/newforms-admin/django/contrib/admin/sites.py" in model_page 153. return admin_obj(request, rest_of_url) File "/home/longman/django-svn/newforms-admin/django/contrib/admin/options.py" in __call__ 251. return self.add_view(request) File "/home/longman/django-svn/newforms-admin/django/contrib/admin/options.py" in add_view 505. inline_formset = FormSet() TypeError at /admin/gmaps/point/add/ __init__() takes at least 2 arguments (1 given)
Attachments (1)
Change History (6)
by , 17 years ago
Attachment: | 09-inline-parent-instance.diff added |
---|
comment:1 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Has patch: | set |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
comment:3 by , 17 years ago
Cc: | added |
---|
comment:4 by , 17 years ago
Yes, this is an issue with current revision of newforms-admin. It was discussed slightly in #5895 with a correct solution. However, this ticket is the correct place for patches and further comments about the issue.
Note:
See TracTickets
for help on using tickets.
I think this ticket should not be closed - it is not fixed in django.
This code from django.contrib.admin.ModelAdmin.add_view is problematic:
It is not compatible with django.newforms.models.InlineFormset: