Commit c341e07a authored by Michal Čihař's avatar Michal Čihař

Move path creation to PathMixin

parent 327ef3bd
......@@ -140,3 +140,11 @@ class PathMixin(object):
self._dir_path = None
new_path = self.get_path()
os.rename(old_path, new_path)
def create_path(self):
'''
Create filesystem directory for storing data
'''
path = self.get_path()
if not os.path.exists(path):
os.makedirs(path)
......@@ -269,14 +269,6 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin):
def __unicode__(self):
return self.name
def create_path(self):
'''
Create filesystem directory for storing data
'''
path = self.get_path()
if not os.path.exists(path):
os.makedirs(path)
def save(self, *args, **kwargs):
# Renaming detection
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment