I'm trying to generate dynamic file paths in django. I want to make a file system like this
hierarchy:
--user_12 --channel_14 --program 2 --image1.jpg --image2.jpg --program 1 --image1.jpg --image2.jpg --user_14 --channel_13 --program 1 --image1.jpg --image2.jpg
When a user want to upload image it will upload the image to the corresponding program folder.if program folder does not create it will automatically create a folder and store image..
my image path will look like this: media/images/john/johnchannel/birthday/img1.jpg ( where john=user,johnchannel=channel,birthday=program,images is the pre created folder where all image file should be stored) I am very new in django. urgent help needed.
Are you looking for something like this?
misc.py
models.py