WuttaWeb 0.8.0__tar.gz → 0.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/CHANGELOG.md +6 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/PKG-INFO +1 -1
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/pyproject.toml +1 -1
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/util.py +40 -3
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/test_util.py +20 -3
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/.gitignore +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/COPYING.txt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/README.md +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/Makefile +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/_static/.keepme +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/index.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/app.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/auth.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/db.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/forms.base.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/forms.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/forms.schema.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/forms.widgets.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/grids.base.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/grids.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/handler.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/helpers.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/index.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/menus.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/static.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/subscribers.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/util.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.auth.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.base.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.common.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.essential.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.master.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.people.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.roles.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.settings.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/api/wuttaweb/views.users.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/conf.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/glossary.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/index.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/make.bat +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/docs/narr/index.rst +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/__init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/_version.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/app.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/auth.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/db.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/forms/__init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/forms/base.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/forms/schema.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/forms/widgets.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/grids/__init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/grids/base.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/handler.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/helpers.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/menus.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/static/__init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/static/img/favicon.ico +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/static/img/logo.png +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/static/img/testing.png +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/subscribers.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/appinfo/configure.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/appinfo/index.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/auth/change_password.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/auth/login.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/base.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/base_meta.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/configure.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/checkbox.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/checkbox_choice.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/checked_password.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/password.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/permissions.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/readonly/notes.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/readonly/objectref.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/readonly/permissions.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/select.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/textarea.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/deform/textinput.pt +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/forbidden.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/form.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/forms/vue_template.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/grids/vue_template.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/home.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/master/configure.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/master/create.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/master/delete.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/master/edit.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/master/form.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/master/index.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/master/view.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/notfound.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/page.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/people/view_profile.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/setup.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/templates/wutta-components.mako +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/__init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/auth.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/base.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/common.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/essential.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/master.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/people.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/roles.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/settings.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/src/wuttaweb/views/users.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tasks.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/__init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/forms/__init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/forms/test_base.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/forms/test_schema.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/forms/test_widgets.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/grids/__init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/grids/test_base.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/bb_fontawesome_svg_core.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/bb_free_solid_svg_icons.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/bb_oruga.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/bb_oruga_bulma.css +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/bb_oruga_bulma.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/bb_vue.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/bb_vue_fontawesome.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/buefy.css +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/buefy.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/fontawesome.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/vue.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/libcache/vue_resource.js +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/test_app.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/test_auth.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/test_handler.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/test_helpers.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/test_menus.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/test_static.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/test_subscribers.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/util.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/__init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/test___init__.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/test_auth.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/test_base.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/test_common.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/test_master.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/test_people.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/test_roles.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/test_settings.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tests/views/test_users.py +0 -0
- {wuttaweb-0.8.0 → wuttaweb-0.8.1}/tox.ini +0 -0
|
@@ -5,6 +5,12 @@ All notable changes to wuttaweb will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## v0.8.1 (2024-08-15)
|
|
9
|
+
|
|
10
|
+
### Fix
|
|
11
|
+
|
|
12
|
+
- improve backward compat for `util.get_liburl()`
|
|
13
|
+
|
|
8
14
|
## v0.8.0 (2024-08-15)
|
|
9
15
|
|
|
10
16
|
### Feat
|
|
@@ -27,6 +27,7 @@ Web Utilities
|
|
|
27
27
|
import importlib
|
|
28
28
|
import json
|
|
29
29
|
import logging
|
|
30
|
+
import warnings
|
|
30
31
|
|
|
31
32
|
import sqlalchemy as sa
|
|
32
33
|
|
|
@@ -153,20 +154,34 @@ def get_libver(
|
|
|
153
154
|
config = request.wutta_config
|
|
154
155
|
|
|
155
156
|
# nb. we prefer a setting to be named like: wuttaweb.libver.vue
|
|
156
|
-
# but for back-compat this also can work:
|
|
157
|
+
# but for back-compat this also can work: tailbone.libver.vue
|
|
158
|
+
# and for more back-compat this can work: wuttaweb.vue_version
|
|
157
159
|
# however that compat only works for some of the settings...
|
|
158
160
|
|
|
159
161
|
if not default_only:
|
|
162
|
+
|
|
160
163
|
# nb. new/preferred setting
|
|
161
|
-
version = config.get(f'
|
|
164
|
+
version = config.get(f'wuttaweb.libver.{key}')
|
|
162
165
|
if version:
|
|
163
166
|
return version
|
|
164
167
|
|
|
168
|
+
# fallback to caller-specified prefix
|
|
169
|
+
if prefix != 'wuttaweb':
|
|
170
|
+
version = config.get(f'{prefix}.libver.{key}')
|
|
171
|
+
if version:
|
|
172
|
+
warnings.warn(f"config for {prefix}.libver.{key} is deprecated; "
|
|
173
|
+
f"please set wuttaweb.libver.{key} instead",
|
|
174
|
+
DeprecationWarning)
|
|
175
|
+
return version
|
|
176
|
+
|
|
165
177
|
if key == 'buefy':
|
|
166
178
|
if not default_only:
|
|
167
179
|
# nb. old/legacy setting
|
|
168
180
|
version = config.get(f'{prefix}.buefy_version')
|
|
169
181
|
if version:
|
|
182
|
+
warnings.warn(f"config for {prefix}.buefy_version is deprecated; "
|
|
183
|
+
"please set wuttaweb.libver.buefy instead",
|
|
184
|
+
DeprecationWarning)
|
|
170
185
|
return version
|
|
171
186
|
if not configured_only:
|
|
172
187
|
return 'latest'
|
|
@@ -182,6 +197,9 @@ def get_libver(
|
|
|
182
197
|
# nb. old/legacy setting
|
|
183
198
|
version = config.get(f'{prefix}.vue_version')
|
|
184
199
|
if version:
|
|
200
|
+
warnings.warn(f"config for {prefix}.vue_version is deprecated; "
|
|
201
|
+
"please set wuttaweb.libver.vue instead",
|
|
202
|
+
DeprecationWarning)
|
|
185
203
|
return version
|
|
186
204
|
if not configured_only:
|
|
187
205
|
return '2.6.14'
|
|
@@ -293,16 +311,35 @@ def get_liburl(
|
|
|
293
311
|
config = request.wutta_config
|
|
294
312
|
|
|
295
313
|
if not default_only:
|
|
314
|
+
|
|
315
|
+
# nb. new/preferred setting
|
|
316
|
+
url = config.get(f'wuttaweb.liburl.{key}')
|
|
317
|
+
if url:
|
|
318
|
+
return url
|
|
319
|
+
|
|
320
|
+
# fallback to caller-specified prefix
|
|
296
321
|
url = config.get(f'{prefix}.liburl.{key}')
|
|
297
322
|
if url:
|
|
323
|
+
warnings.warn(f"config for {prefix}.liburl.{key} is deprecated; "
|
|
324
|
+
f"please set wuttaweb.liburl.{key} instead",
|
|
325
|
+
DeprecationWarning)
|
|
298
326
|
return url
|
|
299
327
|
|
|
300
328
|
if configured_only:
|
|
301
329
|
return
|
|
302
330
|
|
|
303
|
-
version = get_libver(request, key, prefix=prefix
|
|
331
|
+
version = get_libver(request, key, prefix=prefix,
|
|
332
|
+
configured_only=False,
|
|
333
|
+
default_only=default_only)
|
|
304
334
|
|
|
335
|
+
# load fanstatic libcache if configured
|
|
305
336
|
static = config.get('wuttaweb.static_libcache.module')
|
|
337
|
+
if not static:
|
|
338
|
+
static = config.get(f'{prefix}.static_libcache.module')
|
|
339
|
+
if static:
|
|
340
|
+
warnings.warn(f"config for {prefix}.static_libcache.module is deprecated; "
|
|
341
|
+
"please set wuttaweb.static_libcache.module instead",
|
|
342
|
+
DeprecationWarning)
|
|
306
343
|
if static:
|
|
307
344
|
static = importlib.import_module(static)
|
|
308
345
|
needed = request.environ['fanstatic.needed']
|
|
@@ -59,6 +59,11 @@ class TestGetLibVer(TestCase):
|
|
|
59
59
|
version = util.get_libver(self.request, 'buefy')
|
|
60
60
|
self.assertEqual(version, '0.9.29')
|
|
61
61
|
|
|
62
|
+
def test_buefy_custom_old_tailbone(self):
|
|
63
|
+
self.config.setdefault('tailbone.libver.buefy', '0.9.28')
|
|
64
|
+
version = util.get_libver(self.request, 'buefy', prefix='tailbone')
|
|
65
|
+
self.assertEqual(version, '0.9.28')
|
|
66
|
+
|
|
62
67
|
def test_buefy_custom_new(self):
|
|
63
68
|
self.config.setdefault('wuttaweb.libver.buefy', '0.9.29')
|
|
64
69
|
version = util.get_libver(self.request, 'buefy')
|
|
@@ -221,10 +226,11 @@ class TestGetLibUrl(TestCase):
|
|
|
221
226
|
def tearDown(self):
|
|
222
227
|
testing.tearDown()
|
|
223
228
|
|
|
224
|
-
def setup_fanstatic(self):
|
|
229
|
+
def setup_fanstatic(self, register=True):
|
|
225
230
|
self.pyramid_config.include('pyramid_fanstatic')
|
|
226
|
-
|
|
227
|
-
|
|
231
|
+
if register:
|
|
232
|
+
self.config.setdefault('wuttaweb.static_libcache.module',
|
|
233
|
+
'tests.test_util')
|
|
228
234
|
|
|
229
235
|
needed = MagicMock()
|
|
230
236
|
needed.library_url = MagicMock(return_value='/fanstatic')
|
|
@@ -240,6 +246,11 @@ class TestGetLibUrl(TestCase):
|
|
|
240
246
|
url = util.get_liburl(self.request, 'buefy')
|
|
241
247
|
self.assertEqual(url, '/lib/buefy.js')
|
|
242
248
|
|
|
249
|
+
def test_buefy_custom_tailbone(self):
|
|
250
|
+
self.config.setdefault('tailbone.liburl.buefy', '/tailbone/buefy.js')
|
|
251
|
+
url = util.get_liburl(self.request, 'buefy', prefix='tailbone')
|
|
252
|
+
self.assertEqual(url, '/tailbone/buefy.js')
|
|
253
|
+
|
|
243
254
|
def test_buefy_default_only(self):
|
|
244
255
|
self.config.setdefault('wuttaweb.liburl.buefy', '/lib/buefy.js')
|
|
245
256
|
url = util.get_liburl(self.request, 'buefy', default_only=True)
|
|
@@ -254,6 +265,12 @@ class TestGetLibUrl(TestCase):
|
|
|
254
265
|
url = util.get_liburl(self.request, 'buefy')
|
|
255
266
|
self.assertEqual(url, '/wutta/fanstatic/buefy.js')
|
|
256
267
|
|
|
268
|
+
def test_buefy_fanstatic_tailbone(self):
|
|
269
|
+
self.setup_fanstatic(register=False)
|
|
270
|
+
self.config.setdefault('tailbone.static_libcache.module', 'tests.test_util')
|
|
271
|
+
url = util.get_liburl(self.request, 'buefy', prefix='tailbone')
|
|
272
|
+
self.assertEqual(url, '/wutta/fanstatic/buefy.js')
|
|
273
|
+
|
|
257
274
|
def test_buefy_css_default(self):
|
|
258
275
|
url = util.get_liburl(self.request, 'buefy.css')
|
|
259
276
|
self.assertEqual(url, 'https://unpkg.com/buefy@latest/dist/buefy.min.css')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|