mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Refactored view class hierarchy, refs #272
See https://github.com/simonw/datasette/issues/272#issuecomment-502393107
This commit is contained in:
parent
aa911122fe
commit
d4df640d18
5 changed files with 11 additions and 11 deletions
|
|
@ -49,7 +49,7 @@ class DatasetteError(Exception):
|
|||
self.messagge_is_html = messagge_is_html
|
||||
|
||||
|
||||
class RenderMixin(HTTPMethodView):
|
||||
class BaseView(HTTPMethodView):
|
||||
def _asset_urls(self, key, template, context):
|
||||
# Flatten list-of-lists from plugins:
|
||||
seen_urls = set()
|
||||
|
|
@ -128,7 +128,7 @@ class RenderMixin(HTTPMethodView):
|
|||
)
|
||||
|
||||
|
||||
class BaseView(RenderMixin):
|
||||
class DataView(BaseView):
|
||||
name = ""
|
||||
re_named_parameter = re.compile(":([a-zA-Z0-9_]+)")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue