Skip to content

Commit

Permalink
fix(history): rename change_history to history
Browse files Browse the repository at this point in the history
Closes: #802
  • Loading branch information
b1rger committed May 7, 2024
1 parent f9b1278 commit 14cfb22
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apis_core/history/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions apis_core/history/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

urlpatterns = [
path(
"change_history/<contenttype:contenttype>/<int:pk>/",
views.ChangeHistoryView.as_view(),
name="change_history",
"<contenttype:contenttype>/<int:pk>/history",
views.HistoryView.as_view(),
name="history",
),
path(
"add_new_version/<contenttype:contenttype>/<int:pk>/",
Expand Down
4 changes: 2 additions & 2 deletions apis_core/history/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 14cfb22

Please sign in to comment.