Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Pop-Up #19

Closed
tzulberti opened this issue Jul 13, 2012 · 11 comments
Closed

Error on Pop-Up #19

tzulberti opened this issue Jul 13, 2012 · 11 comments
Assignees
Milestone

Comments

@tzulberti
Copy link

I have a ajax-select field, which has the option to add a value at it's right. The pop-up with the form opens, and I try to save it.

I there is an error while saving the data, then the following exception take place:

Traceback (most recent call last):

  File "/home/otendor/envs/otendor-data/lib/python2.6/site-packages/Django-1.4-py2.6.egg/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/home/otendor/envs/otendor-data/lib/python2.6/site-packages/django_ajax_selects-1.2.4-py2.6.egg/ajax_select/views.py", line 65, in add_popup
    if 'opener.dismissAddAnotherPopup' in response.content:

  File "/home/otendor/envs/otendor-data/lib/python2.6/site-packages/Django-1.4-py2.6.egg/django/template/response.py", line 123, in _get_content
    raise ContentNotRenderedError('The response content must be '

ContentNotRenderedError: The response content must be rendered before it can be accessed.
@ghost ghost assigned crucialfelix Jul 13, 2012
@crucialfelix
Copy link
Owner

looks like a 1.4 issue. I will test it with 1.4 and fix

thanks for the report !

@crucialfelix
Copy link
Owner

I've tested with 1.4 and I do not get this error. I wonder what else you have that causes this. are there any strange middlewares installed ? I tested with just the defaults

@paveu
Copy link

paveu commented Oct 1, 2012

i've got same problem here when i try to save value to field and then error pops up.

Traceback:
File "/home/rad/.virtualenvs/cas/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, _callback_args, *_callback_kwargs)
File "/home/rad/.virtualenvs/cas/lib/python2.6/site-packages/ajax_select/views.py" in add_popup
65. if 'opener.dismissAddAnotherPopup' in response.content:
File "/home/rad/.virtualenvs/cas/lib/python2.6/site-packages/django/template/response.py" in _get_content
123. raise ContentNotRenderedError('The response content must be '
Exception Type: ContentNotRenderedError at /admin/lookups/add_popup/dhcp/mac_address
Exception Value: The response content must be rendered before it can be accessed.

software:
Python==2.6.6
Django==1.4.1
distribute==0.6.28
django-ajax-selects==1.2.5
github-cli==1.0.0
simplejson==2.6.2
wsgiref==0.1.2
yolk==0.4.3

@crucialfelix
Copy link
Owner

hi paveu, can you report if you have any middleware installed other than the defaults ? (if you don't know then the answer is probably that you just have the defaults)

what is this:
/admin/lookups/add_popup/dhcp/mac_address
?

for some reason you have dhcp/mac_address appended to the URL

@paveu
Copy link

paveu commented Oct 1, 2012

hello,
i don't have any new middleware installed. Everything is default.
/admin/lookups/add_popup/dhcp/mac_address - it's a place (pop-up) where i can put a value to save.

dhcp - is a name of application
mac_address is a class where i can save MAC address.

@crucialfelix
Copy link
Owner

looks like there is some information and a workaround here:

http://stackoverflow.com/questions/7655110/contentnotrenderederror-after-a-django-upgrade

I will investigate further. I still haven't experienced the issue and cannot replicate it.

@paveu
Copy link

paveu commented Oct 1, 2012

in my opinion problem only occurs when you save second time the same value.

@crucialfelix
Copy link
Owner

interesting.

is there anything else you can remember ? any little thought is helpful, thanks

@paveu
Copy link

paveu commented Oct 1, 2012

when i save unique value to field everyting is ok, there is no error, but if you save 2nd time same value error comes up. It's pretty much what happend.

@crucialfelix
Copy link
Owner

I finally figured it out. by "error" I thought you meant that it was throwing an error. I thought you were referring to the bug. but you mean "form validation error". that's when it happens, when it is trying to show the user that the user made an error.

fixed, releasing soon.

@paveu
Copy link

paveu commented Apr 2, 2013

nice to have even when someone changed the job :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants