# ...
class PersonAdvertWizard (SessionWizardView):
def date_now_to_path (self):
Return datetime.datetime.now (). strftime ('% Y /% m /% d')
file_storage = FileSystemStorage (
location = os.path.join (settings.MEDIA_ROOT,
'photos',
date_now_to_path ()))
# ...
I want to make so that user-uploaded images are stored in the directories of the form .../photos/Год/Месяц/День .
This location is determined using the file_storage field of the class inherited from the SessionWizardView class.
How to make every time when creating an object of class PersonAdvertWizard field of class file_storage calculated each time in a new way, and the value calculated during import of the module is not used?