sehmaschine / django-filebrowser

Media-Management with Grappelli
http://twitter.com/sehmaschine
Other
976 stars 408 forks source link

New CHANGE_FILENAME setting #344

Closed sharifzadesina closed 6 years ago

sharifzadesina commented 6 years ago

Hi How about adding a new setting for changing filenames completely to a random unique ID? this is a common situation, and I think it should be available. We can use uuid.uuid1() function from python for this reason. I can create a PR if you are interested.

sehmaschine commented 6 years ago

why not use the built-in signals instead?

sharifzadesina commented 6 years ago

@sehmaschine Cause we also have a help section in admin. screenshot from 2018-01-12 12-14-33

sehmaschine commented 6 years ago

So all we need is to define a custom string for that help section, right?

sharifzadesina commented 6 years ago

@sehmaschine I think we can implement this setting, cause it is common.

sehmaschine commented 6 years ago

I'm not fully convinced, because the settings are already quite complicated. However, with a PR (including tests) I'm happy to review – and if there are no backwards incompatible changes, I'll merge the PR.

sharifzadesina commented 6 years ago

@sehmaschine There won't be any BC break, I will send a PR.

sehmaschine commented 6 years ago

Great. Please take a look at the version namer – it would be nice to have something along that lines (in order to have a consistent API).

sharifzadesina commented 6 years ago

It won't change the behavior of the package, cause the setting will be false by default, I don't know what you mean by version number. I hope you don't mean we have to wait for a MINOR version to come up for this simple setting cause then I have to wait years :D, I think we can do it on a PATCH version, 3.9.2 will be OK.

sehmaschine commented 6 years ago

namer, not number ... see: https://django-filebrowser.readthedocs.io/en/latest/settings.html#version-namer