From 05c3e03a6bf9507d4d59676cca5e87476035db0b Mon Sep 17 00:00:00 2001 From: Jim MacArthur Date: Sat, 26 Aug 2017 13:07:32 +0100 Subject: [PATCH] Move views directory inside doorstop package --- doorstop/core/publisher.py | 2 +- doorstop/server/main.py | 2 +- {views => doorstop/views}/base.tpl | 0 {views => doorstop/views}/document_list.tpl | 0 {views => doorstop/views}/index.tpl | 0 {views => doorstop/views}/item_list.tpl | 0 {views => doorstop/views}/sidebar.tpl | 0 setup.py | 2 +- 8 files changed, 3 insertions(+), 3 deletions(-) rename {views => doorstop/views}/base.tpl (100%) rename {views => doorstop/views}/document_list.tpl (100%) rename {views => doorstop/views}/index.tpl (100%) rename {views => doorstop/views}/item_list.tpl (100%) rename {views => doorstop/views}/sidebar.tpl (100%) diff --git a/doorstop/core/publisher.py b/doorstop/core/publisher.py index 8a8bbdc03..727c34e07 100644 --- a/doorstop/core/publisher.py +++ b/doorstop/core/publisher.py @@ -503,7 +503,7 @@ def _lines_html(obj, linkify=False, extensions=EXTENSIONS, try: bottle.TEMPLATE_PATH.insert(0, os.path.join(os.path.dirname(__file__), - '..', '..', 'views')) + '..', 'views')) if 'baseurl' not in bottle.SimpleTemplate.defaults: bottle.SimpleTemplate.defaults['baseurl'] = '' html = bottle_template(template, body=body, toc=toc_html, parent=obj.parent) diff --git a/doorstop/server/main.py b/doorstop/server/main.py index eb27cfbd6..576bc14bf 100644 --- a/doorstop/server/main.py +++ b/doorstop/server/main.py @@ -80,7 +80,7 @@ def run(args, cwd, _): host = args.host port = args.port or settings.SERVER_PORT bottle.TEMPLATE_PATH.insert(0, os.path.join(os.path.dirname(__file__), - '..', '..', 'views')) + '..', 'views')) # If you started without WSGI, the base will be '/'. if args.baseurl == '' and not args.wsgi: diff --git a/views/base.tpl b/doorstop/views/base.tpl similarity index 100% rename from views/base.tpl rename to doorstop/views/base.tpl diff --git a/views/document_list.tpl b/doorstop/views/document_list.tpl similarity index 100% rename from views/document_list.tpl rename to doorstop/views/document_list.tpl diff --git a/views/index.tpl b/doorstop/views/index.tpl similarity index 100% rename from views/index.tpl rename to doorstop/views/index.tpl diff --git a/views/item_list.tpl b/doorstop/views/item_list.tpl similarity index 100% rename from views/item_list.tpl rename to doorstop/views/item_list.tpl diff --git a/views/sidebar.tpl b/doorstop/views/sidebar.tpl similarity index 100% rename from views/sidebar.tpl rename to doorstop/views/sidebar.tpl diff --git a/setup.py b/setup.py index b1868aea4..87e845e6a 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ def build_description(): packages=setuptools.find_packages(), package_data={'doorstop.core': ['files/*.html', 'files/*.css', 'files/assets/doorstop/*'], - 'views': ['*.tpl']}, + 'doorstop': ['views/*.tpl']}, entry_points={ 'console_scripts': [