mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development
This commit is contained in:
commit
4f5aeed215
@ -4,6 +4,7 @@ from flask_login import UserMixin, AnonymousUserMixin
|
|||||||
from itsdangerous import BadSignature, TimedJSONWebSignatureSerializer
|
from itsdangerous import BadSignature, TimedJSONWebSignatureSerializer
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from werkzeug.security import generate_password_hash, check_password_hash
|
from werkzeug.security import generate_password_hash, check_password_hash
|
||||||
|
from werkzeug.utils import secure_filename
|
||||||
from . import db, logger, login_manager
|
from . import db, logger, login_manager
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
@ -318,6 +319,13 @@ class Job(db.Model):
|
|||||||
"""
|
"""
|
||||||
return '<Job %r>' % self.title
|
return '<Job %r>' % self.title
|
||||||
|
|
||||||
|
def create_secure_filename(self):
|
||||||
|
"""
|
||||||
|
Takes the job.title string nad cratesa a secure filename from this.
|
||||||
|
"""
|
||||||
|
filename = secure_filename(self.title)
|
||||||
|
return filename
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
"""
|
"""
|
||||||
Delete the job and its inputs and outputs from database and filesystem.
|
Delete the job and its inputs and outputs from database and filesystem.
|
||||||
|
Loading…
Reference in New Issue
Block a user