Closed wichert closed 12 years ago
other than changing the name to strip_metadata_from_target_name
, it's a go!
strip_metadata_from_target_name
(default: False
) and strip_metadata_from_name
(default: True
) are done.
It would be worth looking at configurator_created_at_from_name.py
to see how this works. The new configurator stuff is cool, I think, but just a hint of voodoo.
Several components in strangecase use the filename to provide data: initial digits to define an order, a date to set created_at. Essentially this is a mechanism to configure metadata in the filename. There is one downside to this approach: it exposes what are essentially internal details to the outside world via URLs. To fix that I propose to add an option to remove metadata from filenames as it is parsed. I can not image a situation where this flag should be different for piece of metadata than for others, so this should be a single flag.
I would suggest to manage this via a configuration option called
strip-metadata-from-filename
.