url/+index gives TemplateNotFound Error

Issue #405 resolved
kumar rishabh
created an issue

The file index_action.js which is supposed to be MoinMoin/templates/ is in MoinMoin/static/js.

TemplateNotFound: index_action.js
2014-02-10 03:13:13,671 INFO werkzeug:87 127.0.0.1 "GET /+template/index_action.js HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back/MoinMoin/apps/frontend/views.py", line 2180, in template
    content = render_template(filename)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back/MoinMoin/themes/__init__.py", line 52, in render_template
    return render_theme_template(get_current_theme(), template, **context)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flaskext/themes.py", line 448, in render_theme_template
    return render_template(template_name, **context)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/templating.py", line 127, in render_template
    return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/jinja2/environment.py", line 830, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/jinja2/environment.py", line 791, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/jinja2/environment.py", line 765, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/home/hellboy2k8/Documents/moinmoin/moinAlter/moin-2.0Back-venv-python/lib/python2.7/site-packages/flask/templating.py", line 64, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: index_action.js

A possible solution could be copying the to MoinMoin/templates/ folder. I am not sure if /static/js/index_action.js is used by some other file

Comments (3)

  1. Log in to comment