Skip to content

Commit 6e19657

Browse files
committed
Reorder and cleanup project settings page
Fixes #9530
1 parent 9514c62 commit 6e19657

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

readthedocs/projects/forms.py

+14-10
Original file line numberDiff line numberDiff line change
@@ -407,30 +407,29 @@ class Meta:
407407
# Basics and repo settings
408408
"name",
409409
"repo",
410-
"repo_type",
411-
"default_branch",
412410
"language",
413-
"description",
414-
# Project related settings
415411
"default_version",
416412
"privacy_level",
417413
"versioning_scheme",
418-
"external_builds_enabled",
419-
"external_builds_privacy_level",
414+
"default_branch",
420415
"readthedocs_yaml_path",
421-
"analytics_code",
422-
"analytics_disabled",
423-
"show_version_warning",
424416
# Meta data
425417
"programming_language",
426418
"project_url",
419+
"description",
427420
"tags",
421+
# Booleans
422+
"external_builds_enabled",
423+
"external_builds_privacy_level",
424+
# Deprecated
425+
"analytics_code",
426+
"analytics_disabled",
427+
"show_version_warning",
428428
)
429429

430430
description = forms.CharField(
431431
required=False,
432432
max_length=150,
433-
widget=forms.Textarea,
434433
)
435434

436435
def __init__(self, *args, **kwargs):
@@ -466,6 +465,11 @@ def __init__(self, *args, **kwargs):
466465
for field in ["privacy_level", "external_builds_privacy_level"]:
467466
self.fields.pop(field)
468467

468+
# Remove analytics from new dashboard
469+
if settings.RTD_EXT_THEME_ENABLED:
470+
for field in ["analytics_code", "analytics_disabled"]:
471+
self.fields.pop(field)
472+
469473
default_choice = (None, "-" * 9)
470474
versions_choices = (
471475
self.instance.versions(manager=INTERNAL)

readthedocs/projects/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class Project(models.Model):
257257
_("Repository URL"),
258258
max_length=255,
259259
validators=[validate_repository_url],
260-
help_text=_("Hosted documentation repository URL"),
260+
help_text=_("Git repository URL"),
261261
db_index=True,
262262
)
263263

0 commit comments

Comments
 (0)