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

Support for GenericForeignKey #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexhayes
Copy link

I'd like to propose better support for GenericForeignKeys.

I'd like to do the following;

owner = G(ModelWithDefaultValues)
G(ModelWithGenericForeignKey, owner=owner)

This would automatically set the owner_type and owner_id.

I've added a very basic failing test which could probably be expanded upon.

In terms of actual support in DDF I have not implemented this, however I'd be willing to attempt it if it's something the core devs believe should be a feature.

@paulocheque
Copy link
Owner

Hi @alexhayes . Sorry for the delay.

I suppose this could be interesting. Not sure yet how hard would be the implementation.

If you create a PR I would be glad to merge it.

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

Successfully merging this pull request may close these issues.

2 participants