tethysplatform / tethys

The Tethys Platform main Django website project repository.
http://tethysplatform.org/
BSD 2-Clause "Simplified" License
92 stars 49 forks source link

Addition of Prefix path #969

Closed romer8 closed 1 year ago

romer8 commented 1 year ago

Adding prefix path to the tethys platform through a new portal_config setting called PREFIX_TO_PATH:

coveralls commented 1 year ago

Coverage Status

coverage: 100.0%. remained the same when pulling a4a034c259fac8df596e4396085ad267ffd4dd0b on romer8:prefix_path into fbb8f7fb94f63caa0d80cdf0d87bc5491a875890 on tethysplatform:main.

swainn commented 1 year ago

I think this does a lot of things in a better way. It's good to get some hard-coded urls removed. I'm curious what the motivation for the url_prefix is though. Is someone needing to host multiple sites on a single domain, so they want a better way to filter urls on the proxy server?

Hey @sdc50 thanks for reviewing this. The motivation is as you surmised, we have a need for installing a Tethys Portal and a Django CMS instance on the same domain. Since they are both Django-based, we were getting conflicts with some of the URLs such as the admin site URLs. In general, I think being able to prefix Tethys will allow for flexibility in deploying it in the future.

swainn commented 1 year ago

@sdc50 thoughts on merging this despite the issue with the macos tests?

swainn commented 1 year ago

@sdc50 thoughts on merging this despite the issue with the macos tests?

nvm. I was able to get the mac tests running again by switching the tests to use conda-libmamba-solver instead of using the mamba package.

swainn commented 1 year ago

@romer8 I think we just need to get that coverage back up to 100 and we can merge.

swainn commented 1 year ago

Rebased and pushed to branch in the tethysplatform/tethys repo to make sure Docker and Conda builds are working. See #974.