Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Websites UFRPE
Django Private Storage
Commits
c6b850b1
Commit
c6b850b1
authored
Feb 06, 2018
by
Diederik van der Boor
Browse files
Fixed Django 2.0 compatibility in the new generate_filename()
parent
60265a1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
private_storage/fields.py
View file @
c6b850b1
...
@@ -85,9 +85,6 @@ class PrivateFileField(models.FileField):
...
@@ -85,9 +85,6 @@ class PrivateFileField(models.FileField):
# Support list, so joining can be done in a storage-specific manner.
# Support list, so joining can be done in a storage-specific manner.
path_parts
.
extend
([
self
.
storage
.
get_valid_name
(
dir
)
for
dir
in
extra_dirs
])
path_parts
.
extend
([
self
.
storage
.
get_valid_name
(
dir
)
for
dir
in
extra_dirs
])
if
not
path_parts
:
path_parts
=
[
self
.
get_directory_name
()]
path_parts
.
append
(
self
.
_get_clean_filename
(
filename
))
path_parts
.
append
(
self
.
_get_clean_filename
(
filename
))
if
django
.
VERSION
>=
(
1
,
10
):
if
django
.
VERSION
>=
(
1
,
10
):
filename
=
posixpath
.
join
(
*
path_parts
)
filename
=
posixpath
.
join
(
*
path_parts
)
...
...
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