Closed sdc50 closed 7 months ago
Change the scaffolds so the class
name of the TethysAppBase
and TethysExtensionBase
objects that are generated have a generic name.
@swainn I still have no idea why the test_update_row_exception
test was causing an error on the CI. I couldn't get it to error locally. The error was due to it not being able to find the tethys
template tag library when rendering the job_row_error.html
template. As it turns out, that template doesn't actually use any tethys
template filters, so I just remove it from the load
tag. That's allowing tests to pass, but I'm stiff baffled as to what the issue was.
Let me know what you think about Ext
vs. Extension
and my justification for importing Extension
as a custom name in the example.
@swainn I still have no idea why the
test_update_row_exception
test was causing an error on the CI. I couldn't get it to error locally. The error was due to it not being able to find thetethys
template tag library when rendering thejob_row_error.html
template. As it turns out, that template doesn't actually use anytethys
template filters, so I just remove it from theload
tag. That's allowing tests to pass, but I'm stiff baffled as to what the issue was.Let me know what you think about
Ext
vs.Extension
and my justification for importingExtension
as a custom name in the example.
I have an idea of what it might be. I didn't see any changes in the tethys_sdk
module in the PR:
Did you forget to commit it?
Also, I don't think tethys_sdk
is a Django app, so I'm not sure how it is loading template tags from there.
I have an idea of what it might be. I didn't see any changes in the
tethys_sdk
module in the PR:
You are absolutely correct! 🤦♂️
Also, I don't think tethys_sdk is a Django app, so I'm not sure how it is loading template tags from there.
tethys_sdk
is a Django app and it's listed in INSTALLED_APPS
:
https://github.com/tethysplatform/tethys/blob/main/tethys_portal/settings.py#L232
Fixes #997
Compiles all Tethys template tags/filters into a single
tethys
namespace templatetag library.Add template filters and TethysBase classmethods to use inplace of
django.shortcuts
functions to avoid using theapp.package
as a magic stringAdd the following template filters:
Changes the scaffold to extend the
base.html
without using theproject
:Changes scaffolds to name app/ext classes as
App
andExtension
.Adds
render
,redirect
,reverse
, andrender_to_string
methods totethys_apps.base.app_base.TethysBase
to replace thedjango.shortcuts
functions: