Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(history): rename change_history to history #812

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading