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
|
from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
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>", views.AccountUpdateView.as_view(), name="account"),
|
||||||
path(
|
path(
|
||||||
"<account>/transactions",
|
"<account>/transactions",
|
||||||
|
|
|
@ -4,7 +4,7 @@ from transaction.views import TransactionMonthView
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
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>", views.CategoryUpdateView.as_view(), name="category"),
|
||||||
path(
|
path(
|
||||||
"<category>/transactions",
|
"<category>/transactions",
|
||||||
|
|
|
@ -3,6 +3,6 @@ from django.urls import path
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("search", views.SearchFormView.as_view(), name="search"),
|
path("", views.SearchFormView.as_view(), name="search"),
|
||||||
path("search/<search>", views.SearchView.as_view(), name="search"),
|
path("<search>", views.SearchView.as_view(), name="search"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -115,9 +115,6 @@ class TransactionMonthView(UserMixin, MonthArchiveView):
|
||||||
context_object_name = "transactions"
|
context_object_name = "transactions"
|
||||||
month_format = "%m"
|
month_format = "%m"
|
||||||
|
|
||||||
account = None
|
|
||||||
category = None
|
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
if "account" in self.kwargs:
|
if "account" in self.kwargs:
|
||||||
self.account = get_object_or_404(
|
self.account = get_object_or_404(
|
||||||
|
|
Loading…
Reference in a new issue