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

instance attributes filtering #3

Open
ouhouhsami opened this issue Dec 19, 2010 · 1 comment
Open

instance attributes filtering #3

ouhouhsami opened this issue Dec 19, 2010 · 1 comment

Comments

@ouhouhsami
Copy link

Hello,

I'd like to be able to filter attributes, not for a model, but for each instances of a model, regarding a value of one of its field.

an example:

class EavConfigClass(EavConfig):
@classmethod
def get_attributes(cls, id_of_my_instance):
type = filtering_from_my_instance_value
return Attribute.objects.filter(type=type)

@ksamuel
Copy link

ksamuel commented Jan 20, 2011

Hello ouhouhsami. Sorry for responding so late, we have created Django EAV for our own use and never though sombody else would ask about it :-)

We won't patch eav to add a new feature for now since we don't have time to garanty it's stable enought. But this is an open source project and you are welcome to make a pull request with a patch of an implementation of this suggestion with unit tests to back up it.

Cheers,

Kevin

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