Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Dump filenames without spaces #72

Open
jayvdb opened this issue Feb 5, 2021 · 1 comment
Open

Dump filenames without spaces #72

jayvdb opened this issue Feb 5, 2021 · 1 comment

Comments

@jayvdb
Copy link

jayvdb commented Feb 5, 2021

Filenames for /app/model/dump end up as app-model-_2021-02-05T12 25 46.775165.yaml for me. It would be simpler to use these filenames didnt contain spaces ( ), or even :. Also the _ before the year, i.e. -_2021 is a bit odd. i.e. ISO 8601 without the colons would be ideal, especially in UTC given the file could be moved across timezones, and thus the stamp should be terminated with Z.

@jaap3
Copy link
Collaborator

jaap3 commented Feb 6, 2021

The datetime part of the filename is appended here:

filename = '%s.%s' % (datetime.now().isoformat(),
settings.SMUGGLER_FORMAT)
, a patch that replaces the colon with an empty string will probably be accepted.

The app-model bit before the timestamp probably comes from here:

return dump_to_response(request, '%s.%s' % (app_label, model_label),
[], '-'.join((app_label, model_label)))
, I'm not sure how the extra dash ends up there. If you can find out why, a patch that fixes is will be appreciated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants