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

Fixed #26144 -- Added warning when dumping proxy model #6051

Closed
wants to merge 1 commit into from
Closed

Fixed #26144 -- Added warning when dumping proxy model #6051

wants to merge 1 commit into from

Conversation

yoongkang
Copy link
Contributor

No description provided.

@timgraham
Copy link
Member

Please see the ticket for feedback on the implementation.

@yoongkang
Copy link
Contributor Author

Does this look okay?

if model._meta.proxy and inspect.getmro(model)[1] not in models:
warnings.warn(
"%s is a Proxy model. It won't be serialized." %
model.__name__,
Copy link
Member

Choose a reason for hiding this comment

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

I'd use model._meta.label (which includes the app_label).

@yoongkang
Copy link
Contributor Author

@timgraham Thanks for the review. I've made the changes.

@timgraham
Copy link
Member

merged in 0edb8a1, thanks!

@timgraham timgraham closed this Feb 5, 2016
@yoongkang yoongkang deleted the ticket_26144 branch February 5, 2016 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants