[GH-ISSUE #50] Admin interface not working #33

Closed
opened 2026-02-26 01:32:57 +03:00 by kerem · 0 comments
Owner

Originally created by @steinsag on GitHub (Nov 9, 2016).
Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/50

It seems the built-in admin interface is not working with current versions of Flask-Admin. My REST endpoints are working fine (cool, many thanks for that!!!), but when I call /admin, I get:

[2016-11-09 12:46:30,369] ERROR in app: Exception on /admin/ [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 69, in inner
return self._run_view(f, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 368, in _run_view
return fn(self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 452, in index
return self.render(self._template)
File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 308, in render
return render_template(template, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 134, in render_template
context, ctx.app)
File "/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 116, in _render
rv = template.render(context)
File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/dist-packages/flask_admin/templates/bootstrap3/admin/index.html", line 1, in top-level template code
{% extends 'admin/master.html' %}
File "/usr/local/lib/python3.5/dist-packages/flask_admin/templates/bootstrap3/admin/master.html", line 1, in top-level template code
{% extends admin_base_template %}
File "/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 57, in get_source
return self._get_source_fast(environment, template)
File "/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 85, in _get_source_fast
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: layout.html
127.0.0.1 - - [09/Nov/2016 12:46:30] "GET /admin/ HTTP/1.1" 500 -

I also tried using virtualenv to install sandman, but no success.

Here is what I got installed on my system:

ls /usr/local/lib/python3.5/dist-packages/ | grep -e ".[0-9]."
click-6.6-py3.5.egg-info
configparser-3.5.0-py3.5.egg-info
configparser-3.5.0-py3.5-nspkg.pth
Flask-0.11.1.dist-info
Flask_Admin-1.4.2-py3.5.egg-info
Flask_GraphQL-1.3.0-py3.5.egg-info
Flask_HTTPAuth-3.2.1-py3.5.egg-info
Flask_SQLAlchemy-2.1-py3.5.egg-info
graphene-1.0.2-py3.5.egg-info
graphene_sqlalchemy-1.0-py3.5.egg-info
graphql_core-1.0-py3.5.egg-info
graphql_relay-0.4.4-py3.5.egg-info
itsdangerous-0.24-py3.5.egg-info
jinja2
Jinja2-2.8.dist-info
MarkupSafe-0.23-py3.5.egg-info
mysql_connector-2.1.4-py3.5.egg-info
pip-9.0.1.dist-info
promise-1.0.0-py3.5.egg-info
py-1.4.31.dist-info
pytest-3.0.3.dist-info
pytest_flask-0.10.0.dist-info
sandman2
sandman2-1.0.4-py3.5.egg-info
setuptools-18.1-py3.5.egg
singledispatch-3.4.0.3.dist-info
SQLAlchemy-1.1.0b3-py3.5.egg-info
typing-3.5.2.2-py3.5.egg-info
virtualenv-15.0.3.dist-info
Werkzeug-0.11.11.dist-info
WTForms-2.1-py3.5.egg-info

How can I fix that?

Originally created by @steinsag on GitHub (Nov 9, 2016). Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/50 It seems the built-in admin interface is not working with current versions of Flask-Admin. My REST endpoints are working fine (cool, many thanks for that!!!), but when I call /admin, I get: > [2016-11-09 12:46:30,369] ERROR in app: Exception on /admin/ [GET] Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1988, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1641, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1544, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise raise value File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1639, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1625, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 69, in inner return self._run_view(f, *args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 368, in _run_view return fn(self, *args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 452, in index return self.render(self._template) File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 308, in render return render_template(template, **kwargs) File "/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 134, in render_template context, ctx.app) File "/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 116, in _render rv = template.render(context) File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 989, in render return self.environment.handle_exception(exc_info, True) File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 754, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.5/dist-packages/jinja2/_compat.py", line 37, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.5/dist-packages/flask_admin/templates/bootstrap3/admin/index.html", line 1, in top-level template code {% extends 'admin/master.html' %} File "/usr/local/lib/python3.5/dist-packages/flask_admin/templates/bootstrap3/admin/master.html", line 1, in top-level template code {% extends admin_base_template %} File "/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 57, in get_source return self._get_source_fast(environment, template) File "/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 85, in _get_source_fast raise TemplateNotFound(template) jinja2.exceptions.TemplateNotFound: layout.html 127.0.0.1 - - [09/Nov/2016 12:46:30] "GET /admin/ HTTP/1.1" 500 - I also tried using virtualenv to install sandman, but no success. Here is what I got installed on my system: > ls /usr/local/lib/python3.5/dist-packages/ | grep -e ".*[0-9].*" click-6.6-py3.5.egg-info configparser-3.5.0-py3.5.egg-info configparser-3.5.0-py3.5-nspkg.pth Flask-0.11.1.dist-info Flask_Admin-1.4.2-py3.5.egg-info Flask_GraphQL-1.3.0-py3.5.egg-info Flask_HTTPAuth-3.2.1-py3.5.egg-info Flask_SQLAlchemy-2.1-py3.5.egg-info graphene-1.0.2-py3.5.egg-info graphene_sqlalchemy-1.0-py3.5.egg-info graphql_core-1.0-py3.5.egg-info graphql_relay-0.4.4-py3.5.egg-info itsdangerous-0.24-py3.5.egg-info jinja2 Jinja2-2.8.dist-info MarkupSafe-0.23-py3.5.egg-info mysql_connector-2.1.4-py3.5.egg-info pip-9.0.1.dist-info promise-1.0.0-py3.5.egg-info py-1.4.31.dist-info pytest-3.0.3.dist-info pytest_flask-0.10.0.dist-info sandman2 sandman2-1.0.4-py3.5.egg-info setuptools-18.1-py3.5.egg singledispatch-3.4.0.3.dist-info SQLAlchemy-1.1.0b3-py3.5.egg-info typing-3.5.2.2-py3.5.egg-info virtualenv-15.0.3.dist-info Werkzeug-0.11.11.dist-info WTForms-2.1-py3.5.egg-info How can I fix that?
kerem closed this issue 2026-02-26 01:32:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sandman2-jeffknupp#33
No description provided.