diff --git a/apis_core/history/models.py b/apis_core/history/models.py index f7d3d1f1e..d53059db7 100644 --- a/apis_core/history/models.py +++ b/apis_core/history/models.py @@ -155,7 +155,7 @@ def delete(self, *args, **kwargs) -> tuple[int, dict[str, int]]: def get_history_url(self): ct = ContentType.objects.get_for_model(self) - return reverse("apis_core:history:change_history", args=[ct, self.id]) + return reverse("apis_core:history:history", args=[ct, self.id]) def get_create_version_url(self): ct = ContentType.objects.get_for_model(self) diff --git a/apis_core/history/templates/history/change_history.html b/apis_core/history/templates/history/history.html similarity index 100% rename from apis_core/history/templates/history/change_history.html rename to apis_core/history/templates/history/history.html diff --git a/apis_core/history/urls.py b/apis_core/history/urls.py index 548d9d3d9..553f293be 100644 --- a/apis_core/history/urls.py +++ b/apis_core/history/urls.py @@ -11,9 +11,9 @@ urlpatterns = [ path( - "change_history///", - views.ChangeHistoryView.as_view(), - name="change_history", + "//history", + views.HistoryView.as_view(), + name="history", ), path( "add_new_version///", diff --git a/apis_core/history/views.py b/apis_core/history/views.py index d62d95073..7941158a4 100644 --- a/apis_core/history/views.py +++ b/apis_core/history/views.py @@ -10,8 +10,8 @@ from .tables import HistoryGenericTable -class ChangeHistoryView(GenericModelMixin, SingleTableMixin, DetailView): - template_name = "history/change_history.html" +class HistoryView(GenericModelMixin, SingleTableMixin, DetailView): + template_name = "history/history.html" def get_table_class(self): table_modules = module_paths(self.model, path="tables", suffix="HistoryTable")