diff --git a/readthedocs/redirects/admin.py b/readthedocs/redirects/admin.py index 399bcff828d..4a6ed9d8265 100644 --- a/readthedocs/redirects/admin.py +++ b/readthedocs/redirects/admin.py @@ -7,9 +7,16 @@ @admin.register(Redirect) class RedirectAdmin(admin.ModelAdmin): - list_display = ["project", "redirect_type", "from_url", "to_url", "status"] + list_display = [ + "project", + "redirect_type", + "from_url", + "to_url", + "position", + "enabled", + ] list_select_related = ("project",) - list_filter = ("redirect_type", "status") + list_filter = ("redirect_type", "enabled") raw_id_fields = ("project",) search_fields = ( "project__slug", diff --git a/readthedocs/redirects/migrations/0009_remove_status_field.py b/readthedocs/redirects/migrations/0009_remove_status_field.py new file mode 100644 index 00000000000..9eb8a52b8c9 --- /dev/null +++ b/readthedocs/redirects/migrations/0009_remove_status_field.py @@ -0,0 +1,16 @@ +# Generated by Django 4.2.9 on 2024-01-30 16:33 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("redirects", "0008_alter_redirect_position"), + ] + + operations = [ + migrations.RemoveField( + model_name="redirect", + name="status", + ), + ] diff --git a/readthedocs/redirects/models.py b/readthedocs/redirects/models.py index 445ee0db413..6e71740059b 100644 --- a/readthedocs/redirects/models.py +++ b/readthedocs/redirects/models.py @@ -116,9 +116,6 @@ class Redirect(models.Model): help_text=_("Order of execution of the redirect."), ) - # TODO: remove this field and use `enabled` instead. - status = models.BooleanField(choices=[], default=True, null=True) - create_dt = models.DateTimeField(auto_now_add=True) update_dt = models.DateTimeField(auto_now=True)