diff --git a/readthedocs/settings/base.py b/readthedocs/settings/base.py index fcacc58bdf0..9a62e950acb 100644 --- a/readthedocs/settings/base.py +++ b/readthedocs/settings/base.py @@ -55,9 +55,13 @@ class CommunityBaseSettings(Settings): DEFAULT_FROM_EMAIL = 'no-reply@readthedocs.org' SERVER_EMAIL = DEFAULT_FROM_EMAIL - # Cookies + # Sessions SESSION_COOKIE_DOMAIN = 'readthedocs.org' SESSION_COOKIE_HTTPONLY = True + SESSION_COOKIE_AGE = 30 * 24 * 60 * 60 # 30 days + SESSION_SAVE_EVERY_REQUEST = True + + # CSRF CSRF_COOKIE_HTTPONLY = True CSRF_COOKIE_AGE = 30 * 24 * 60 * 60 diff --git a/readthedocs/templates/profiles/private/advertising_profile.html b/readthedocs/templates/profiles/private/advertising_profile.html index 1529a6a0f85..a238bff8eb0 100644 --- a/readthedocs/templates/profiles/private/advertising_profile.html +++ b/readthedocs/templates/profiles/private/advertising_profile.html @@ -9,43 +9,44 @@ {% block edit_content_header %} {% trans "Set advertising preferences" %} {% endblock %} {% block edit_content %} -
- {% blocktrans %} - Read the Docs is an open source project. - In order to maintain service, we rely on both the - support of our users, and from sponsor support. - {% endblocktrans %} -
- -- {% blocktrans %} - For more details on advertising on Read the Docs - including the privacy protections we have in place for users - and community advertising we run on behalf of the open source community, - see our documentation. - {% endblocktrans %} -
{% if request.user.gold.exists or request.user.goldonce.exists %}{% blocktrans %} - Note: - Since you are a Gold Member or donor, you will not see advertising as long as you are logged-in. + Since you are a Gold Member or Supporter, you are ad-free for as long as you are logged-in. Thank you for supporting Read the Docs. {% endblocktrans%}
{% else %} ++ {% blocktrans %} + Read the Docs is an open source project. + In order to maintain service, we rely on both the + support of our users, and from sponsor support. + {% endblocktrans %} +
+ ++ {% blocktrans %} + For more details on advertising on Read the Docs + including the privacy protections we have in place for users + and community advertising we run on behalf of the open source community, + see our documentation. + {% endblocktrans %} +
+{% url "gold_detail" as gold_detail %} + {% url "donate" as donate_url %} {% blocktrans %} - You may remove ads completely by becoming a Gold member to Read the Docs. + You can go ad-free by becoming a Gold Member or Supporter of Read the Docs. {% endblocktrans %}
- {% endif %} - + + {% endif %} {% endblock %}