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

Fix for Django 1.10 loaddata #28

Merged
merged 1 commit into from
Nov 23, 2016
Merged

Conversation

adamchainz
Copy link
Member

As per release notes:

loaddata now raises a CommandError instead of showing a warning when the specified fixture file is not found.

Copy link
Member

@timgraham timgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with djangobench, but it seems #24 says initial_data files could be removed. Maybe that's more work than you want to invest right now.

try:
call_command("loaddata", "initial_data", verbosity=0)
except CommandError as exc:
# Django 1.10+ throws if the file doesn't exist, and not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throws (Java-ish) -> errors (or raises)
no comma
add period

As per release notes:

> loaddata now raises a CommandError instead of showing a warning when the specified fixture file is not found.
@adamchainz
Copy link
Member Author

I don't understand #24, they are being loaded by djangobench even if django itself doesn't automatically load them. It would require rewriting the 18 benchmarks using them so I think it's out of scope for this PR.

@timgraham timgraham merged commit 487460d into django:master Nov 23, 2016
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

Successfully merging this pull request may close these issues.

2 participants