Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rolf Erik Sesseng Aas
tdt4242-base
Commits
5e5faf59
Commit
5e5faf59
authored
Apr 19, 2021
by
KreizerHgz
Browse files
CS 69 refactored (dupe method)
parent
1a8d5bf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/secfit/diets/models.py
View file @
5e5faf59
...
...
@@ -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.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment