Skip to content
Snippets Groups Projects
Commit 5e5faf59 authored by KreizerHgz's avatar KreizerHgz
Browse files

CS 69 refactored (dupe method)

parent 1a8d5bf3
No related branches found
No related tags found
No related merge requests found
......@@ -134,19 +134,6 @@ class DietInstance(models.Model):
)
def diet_directory_path(instance, filename):
"""Return path for which diet files should be uploaded on the web server
Args:
instance (DietFile): DietFile instance
filename (str): Name of the file
Returns:
str: Path where diet file is stored
"""
return f"diets/{instance.instance.diet.id}/{filename}"
class DietFile(models.Model):
"""Django model for file associated with a diet. Basically a wrapper.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment