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

add HasTraits to mixin class #294

Merged
merged 1 commit into from
Aug 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jupyter_server/extension/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from jinja2 import Environment, FileSystemLoader

from traitlets import (
HasTraits,
Unicode,
List,
Dict,
Expand Down Expand Up @@ -82,7 +83,7 @@ def _preparse_for_stopping_flags(Application, argv):
app.exit(0)


class ExtensionAppJinjaMixin:
class ExtensionAppJinjaMixin(HasTraits):
"""Use Jinja templates for HTML templates on top of an ExtensionApp."""

jinja2_options = Dict(
Expand All @@ -93,7 +94,6 @@ class ExtensionAppJinjaMixin:
def _prepare_templates(self):
# Get templates defined in a subclass.
self.initialize_templates()

# Add templates to web app settings if extension has templates.
if len(self.template_paths) > 0:
self.settings.update({
Expand Down