diff options
Diffstat (limited to '')
-rw-r--r-- | MANIFEST.in | 1 | ||||
-rw-r--r-- | mu4web/main.py | 7 | ||||
-rw-r--r-- | setup.cfg | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..646cf51 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include mu4web/static/* diff --git a/mu4web/main.py b/mu4web/main.py index 681041e..c147ab7 100644 --- a/mu4web/main.py +++ b/mu4web/main.py @@ -149,7 +149,7 @@ def page_base(title: Optional[str] = None, ('meta', {'name': 'viewport', 'content': 'width=device-width, initial-scale=0.5'}), ('title', title, ' — Mu4Web'), - include_stylesheet('/static/style.css'), + include_stylesheet(url_for('static', 'style.css')), ), ('body', ('nav', @@ -500,7 +500,7 @@ class IMGParser(HTMLParser): self.result += f' {key}="{data}"' key = 'src' - data = '/static/content-blocked.svg' + data = url_for('static', 'content-blocked.svg') self.result += f' {key}="{data}"' else: key = html.escape(key) @@ -571,7 +571,8 @@ def attachement_part_page(): # above, which unblocks it. # TODO this "fails" for images wrapped in anchor tags, since # the anchor tag has priority. - result += "\n<script src='/static/enable_images.js'></script>" + url = url_for('static', 'enable_images.js') + result += f"\n<script src='{url}'></script>" return str(result) @@ -24,8 +24,10 @@ install_requires = # python-pam >= 2.0.2 for pam integration setup_requires = setuptools -py_modules = mu4web -packages = mu4web +packages = find: +include_package_data = True + +[options.packages.find] [flake8] ignore = E731 |