Skip to content

Commit 2d86838

Browse files
add banner for unstable documentation
1 parent f088775 commit 2d86838

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

readthedocs/projects/migrations/0024_add-show-version-warning.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Migration(migrations.Migration):
1515
migrations.AddField(
1616
model_name='project',
1717
name='show_version_warning',
18-
field=models.BooleanField(default=False, help_text='Show warning banner in non-stable nor latest versions.', verbose_name='Show version warning'),
18+
field=models.URLField(blank=True, help_text='You are seeing unstable version of the documentation, see the stable latest versions.', verbose_name='Show version warning'),
1919
),
2020
migrations.AlterField(
2121
model_name='domain',

readthedocs/projects/models.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ class Project(models.Model):
248248
default=False,
249249
help_text='If checked, do not show advertising for this project',
250250
)
251-
show_version_warning = models.BooleanField(
251+
show_version_warning = models.URLField(
252252
_('Show version warning'),
253-
default=False,
254-
help_text=_('Show warning banner in non-stable nor stable latest versions.'),
253+
blank=True,
254+
help_text=_('You are seeing unstable version of the documentation, see the stable latest versions.'),
255255
)
256256

257257
# Sphinx specific build options.

0 commit comments

Comments
 (0)