project-callisto / django-wizard-builder

{{ ARCHIVED('this code has been moved into callisto-core') }}
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Unable to edit wizard builder questions in django admin #184

Open scattermagic opened 7 years ago

scattermagic commented 7 years ago

When inside django admin, all questions and answer models (multi choice, single line text, and so on) give an error when user tries to edit them.

screen shot 2017-10-11 at 12 12 21 pm
coilysiren commented 7 years ago

I can't reproduce this on https://django-wizard-builder.herokuapp.com, and also nesting_server_data isn't a url that wizard builder defines specifically.

A search gives me this https://stackoverflow.com/questions/31254118/django-nested-admin-urls-not-loading so the issue likely lies in your url configuration for django-nested-admin

As an aside, I'm not sure that this code works in python 3.5 as opposed to python 3.6

scattermagic commented 7 years ago

a few things we ran into:

  1. The original issue with admin
  2. When submitting a report to matching in the callisto, and then selecting withdraw, we get a very similar error (image attached).
  3. When doing the same process on the demo app on heroku, we get a 500 error once trying to withdraw. It would be interesting to see if it also is an error with nesting_server_data in heroku.

One curious spot in the wizard builder codebase is wizard_builder / admin / base.py in the DowncastedAdmin class on line 22 we see a reverse_url being generated, maybe this is the source of some broken urls?

Anyways, here is the image of the error we got when we tried to withdraw a report in callisto screen shot 2017-10-17 at 4 15 10 pm

coilysiren commented 7 years ago

Withdrawing from matching https://callisto-core.herokuapp.com is giving an error for me right now, but that error is

Traceback (most recent call last): 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner 
    response = get_response(request) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response 
    response = self._get_response(request) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 217, in _get_response 
    response = self.process_exception_by_middleware(e, request) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 215, in _get_response 
    response = response.render() 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/response.py", line 107, in render 
    self.content = self.rendered_content 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/response.py", line 84, in rendered_content 
    content = template.render(context, self._request) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/backends/django.py", line 66, in render 
    return self.template.render(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 207, in render 
    return self._render(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 199, in _render 
    return self.nodelist.render(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 990, in render 
    bit = node.render_annotated(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 957, in render_annotated 
    return self.render(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py", line 177, in render 
    return compiled_parent._render(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 199, in _render 
    return self.nodelist.render(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 990, in render 
    bit = node.render_annotated(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 957, in render_annotated 
    return self.render(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py", line 72, in render 
    result = block.nodelist.render(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 990, in render 
    bit = node.render_annotated(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 957, in render_annotated 
    return self.render(context) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/template/defaulttags.py", line 458, in render 
    url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/urls/base.py", line 91, in reverse 
    return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))) 
  File "/app/.heroku/python/lib/python3.6/site-packages/django/urls/resolvers.py", line 497, in _reverse_with_prefix 
    raise NoReverseMatch(msg) 
django.urls.exceptions.NoReverseMatch: Reverse for 'None' not found. 'None' is not a valid view function or pattern name. 

which is also a view function error, but with a different traceback