Skip to content

Commit b0379b3

Browse files
authored
Merge pull request readthedocs#5764 from rtfd/davidfischer/domain-ui-improvements
Domain UI improvements
2 parents fd2d720 + 25f5826 commit b0379b3

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

readthedocs/projects/views/private.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from allauth.socialaccount.models import SocialAccount
66
from celery import chain
7+
from django.conf import settings
78
from django.contrib import messages
89
from django.contrib.auth.decorators import login_required
910
from django.contrib.auth.models import User
@@ -720,6 +721,9 @@ class DomainList(DomainMixin, ListViewWithForm):
720721
def get_context_data(self, **kwargs):
721722
ctx = super().get_context_data(**kwargs)
722723

724+
# Get the default docs domain
725+
ctx['default_domain'] = settings.PUBLIC_DOMAIN if settings.USE_SUBDOMAIN else settings.PRODUCTION_DOMAIN
726+
723727
# Retry validation on all domains if applicable
724728
for domain in ctx['domain_list']:
725729
retry_domain_verification.delay(domain_pk=domain.pk)

readthedocs/templates/projects/domain_form.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
<strong>{% trans 'SSL certificate status' %}: </strong>
2828
<span>{{ domain.domainssl.status }}</span>
2929
</p>
30+
{% if domain.domainssl.status == 'pending_validation' %}
31+
<p class="help_text"><small>{% trans 'Did you setup a CNAME record in DNS pointing at "readthedocs.io"?' %}</small></p>
32+
{% endif %}
3033
{% endif %}
3134

3235
{% if domain %}

readthedocs/templates/projects/domain_list.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
{% block project_edit_content_header %}{% trans "Domains" %}{% endblock %}
1313

1414
{% block project_edit_content %}
15-
{# Remove anytime after 2018-10-01 #}
16-
<p class="empty">{% blocktrans %}Recently we added HTTPS support for custom domains. Depending on your setup, you may need to take action for your domain to support HTTPS. <a href="https://docs.readthedocs.io/page/custom_domains.html#custom-domain-ssl">See our docs</a> for details.{% endblocktrans %}</p>
17-
1815
<p class="help_text">
19-
{% trans "This allows you to add domains to your project. This allows them to live in the same namespace in the URLConf for a subdomain or CNAME." %}
16+
{% blocktrans trimmed with docs_url='https://docs.readthedocs.io/page/custom_domains.html' %}
17+
Configuring a custom domain allows you to serve your documentation from a domain other than "{{ default_domain }}". <a href="{{ docs_url }}">Learn more</a>.
18+
{% endblocktrans %}
2019
</p>
2120

2221
{% if object_list %}

0 commit comments

Comments
 (0)