Revised the import of django.utils.timezone.localdate.
This commit is contained in:
@ -25,8 +25,7 @@ from django.db import connection
|
||||
from django.http import HttpResponseRedirect, Http404
|
||||
from django.shortcuts import render
|
||||
from django.urls import reverse
|
||||
from django.utils import dateformat
|
||||
from django.utils.timezone import localdate
|
||||
from django.utils import dateformat, timezone
|
||||
from django.utils.translation import pgettext
|
||||
from django.views.decorators.http import require_GET
|
||||
|
||||
@ -61,7 +60,7 @@ def cash_home(request):
|
||||
and month.
|
||||
"""
|
||||
subject_code = settings.ACCOUNTING["DEFAULT_CASH_SUBJECT"]
|
||||
period_spec = dateformat.format(localdate(), "Y-m")
|
||||
period_spec = dateformat.format(timezone.localdate(), "Y-m")
|
||||
return HttpResponseRedirect(
|
||||
reverse("accounting:cash", args=(subject_code, period_spec)))
|
||||
|
||||
|
Reference in New Issue
Block a user