Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
c341e07a
Commit
c341e07a
authored
Aug 22, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move path creation to PathMixin
parent
327ef3bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
trans/mixins.py
trans/mixins.py
+8
-0
trans/models/project.py
trans/models/project.py
+0
-8
No files found.
trans/mixins.py
View file @
c341e07a
...
...
@@ -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
)
trans/models/project.py
View file @
c341e07a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
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