Fix urls
This commit is contained in:
parent
2d7957b813
commit
a77cfbe339
4 changed files with 4 additions and 7 deletions
|
@ -5,7 +5,7 @@ from transaction.views import TransactionMonthView
|
|||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.AccountCreateView.as_view(), name="new_account"),
|
||||
path("new", views.AccountCreateView.as_view(), name="new_account"),
|
||||
path("<account>", views.AccountUpdateView.as_view(), name="account"),
|
||||
path(
|
||||
"<account>/transactions",
|
||||
|
|
|
@ -4,7 +4,7 @@ from transaction.views import TransactionMonthView
|
|||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.CategoryCreateView.as_view(), name="new_category"),
|
||||
path("new", views.CategoryCreateView.as_view(), name="new_category"),
|
||||
path("<category>", views.CategoryUpdateView.as_view(), name="category"),
|
||||
path(
|
||||
"<category>/transactions",
|
||||
|
|
|
@ -3,6 +3,6 @@ from django.urls import path
|
|||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path("search", views.SearchFormView.as_view(), name="search"),
|
||||
path("search/<search>", views.SearchView.as_view(), name="search"),
|
||||
path("", views.SearchFormView.as_view(), name="search"),
|
||||
path("<search>", views.SearchView.as_view(), name="search"),
|
||||
]
|
||||
|
|
|
@ -115,9 +115,6 @@ class TransactionMonthView(UserMixin, MonthArchiveView):
|
|||
context_object_name = "transactions"
|
||||
month_format = "%m"
|
||||
|
||||
account = None
|
||||
category = None
|
||||
|
||||
def get_queryset(self):
|
||||
if "account" in self.kwargs:
|
||||
self.account = get_object_or_404(
|
||||
|
|
Loading…
Reference in a new issue