Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loaddata expects media files to be in random fixture folder #8

Open
johanneswilm opened this issue Jan 3, 2014 · 1 comment
Open

Comments

@johanneswilm
Copy link
Contributor

I try to load a fixture from the local path,. The corresponding "media" folder is in the same directory. Yet this here seems to just pick one of the apps that has a fixture folder and expects the media folder to be in there.

https://github.com/duncaningram/django-fixture-media/blob/master/fixturemedia/management/commands/loaddata.py#L30-L37

@markpasc
Copy link
Contributor

Ah, yeah, I didn't plan for specifying fixtures by path, only discovering them in the fixture paths.

Looks like we could wrap loaddata.load_label() to set per-label (path or fixture name) fixture_media_paths to fix this. That would still confuse some media paths (when the same label refers to different fixtures in different fixture paths that use the same media filepaths), but those files will clash in the project's live MEDIA_PATH anyway.

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

No branches or pull requests

2 participants