You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some places where we are checking for the DEFAULT_PRIVACY_LEVEL to decide things that are not related to the privacy level but more related to the site/instance we are running (community/corporate site).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This checks have changed a lot now we are using the django storage to get manage them. Although, there are still some places that we can refactor or remove completely this check. Some code will be removed in #6535 or similar.
There are some places where we are checking for the
DEFAULT_PRIVACY_LEVEL
to decide things that are not related to the privacy level but more related to the site/instance we are running (community/corporate site).Example,
get_production_media_path
is using this to decide if we need to useMEDIA_ROOT
orPRODUCTION_MEDIA_ARTIFACTS
: https://github.com/rtfd/readthedocs.org/blob/84cefc40f00083cbc74a473ffb4ef890294159a1/readthedocs/projects/models.py#L402Besdies, I think that
get_production_media_path
is not a good name for this method and shouldn't have theproduction
word on it. Example of usage of this: https://github.com/rtfd/readthedocs.org/blob/84cefc40f00083cbc74a473ffb4ef890294159a1/readthedocs/search/utils.py#L22-L27Why we can't use just the same method
full_json_path
without worry about where we are each time that method is called?Also, here https://github.com/rtfd/readthedocs.org/blob/84cefc40f00083cbc74a473ffb4ef890294159a1/readthedocs/projects/views/public.py#L185 we have harcoded
/prod_artifacts
and we should find a way to get it from a common place.Related: https://github.com/readthedocs/readthedocs-ext/pull/128
The text was updated successfully, but these errors were encountered: