-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project: use a choicefield for selecting the versioning scheme (#10845)
We may want to publish a small blog post communicating this change, when updating a project with API v3, `versioning_scheme` should be used instead of `single_version`. This looks like this: ![Screenshot from 2023-10-24 18-35-50](https://github.com/readthedocs/readthedocs.org/assets/4975310/9f08ede0-603a-4a93-b1c4-179ae370558e) ![Screenshot 2023-10-24 at 18-35-30 Edit Advanced Project Settings Read the Docs](https://github.com/readthedocs/readthedocs.org/assets/4975310/a1c5878c-087a-44bd-8492-d206a9fff9ef) Closes #10781 ### How to deploy this change - Deploy as usual web-extra - Run migration 0109 projects - Deploy webs - Run migration 0110 projects
- Loading branch information
Showing
26 changed files
with
198 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
readthedocs/projects/migrations/0109_add_project_versioning_scheme.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Generated by Django 4.2.5 on 2023-10-18 22:04 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("projects", "0108_migrate_language_code"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="historicalproject", | ||
name="versioning_scheme", | ||
field=models.CharField( | ||
choices=[ | ||
( | ||
"multiple_versions_with_translations", | ||
"Multiple versions with translations (/<language>/<version>/<filename>)", | ||
), | ||
( | ||
"single_version_without_translations", | ||
"Single version without translations (/<filename>)", | ||
), | ||
], | ||
default="multiple_versions_with_translations", | ||
help_text="This affects how the URL of your documentation looks like, and if it supports translations or multiple versions. Changing the versioning scheme will break your current URLs.", | ||
max_length=120, | ||
null=True, | ||
verbose_name="Versioning scheme", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="project", | ||
name="versioning_scheme", | ||
field=models.CharField( | ||
choices=[ | ||
( | ||
"multiple_versions_with_translations", | ||
"Multiple versions with translations (/<language>/<version>/<filename>)", | ||
), | ||
( | ||
"single_version_without_translations", | ||
"Single version without translations (/<filename>)", | ||
), | ||
], | ||
default="multiple_versions_with_translations", | ||
help_text="This affects how the URL of your documentation looks like, and if it supports translations or multiple versions. Changing the versioning scheme will break your current URLs.", | ||
max_length=120, | ||
null=True, | ||
verbose_name="Versioning scheme", | ||
), | ||
), | ||
] |
Oops, something went wrong.