Added the default_spec() method to Period, and applied it to the views in the accounting application.
This commit is contained in:
@ -314,6 +314,15 @@ class Period:
|
||||
"defaultDate": self.chosen_month,
|
||||
})
|
||||
|
||||
@staticmethod
|
||||
def default_spec():
|
||||
"""Returns the specification for the default period.
|
||||
|
||||
Returns:
|
||||
str: The specification for the default period
|
||||
"""
|
||||
return dateformat.format(timezone.localdate(), "Y-m")
|
||||
|
||||
class Parser:
|
||||
"""The period parser.
|
||||
|
||||
|
Reference in New Issue
Block a user