Without PolymorphicModel he's the same error! I'll write an example...
Cheers, Thiago Avelino @avelino0 <http://twitter.com/avelino0> - avelino.xxx On Thu, Sep 18, 2014 at 12:11 PM, Carl Meyer <c...@oddbird.net> wrote: > Hi Thiago, > > On 09/18/2014 08:51 AM, Thiago Avelino wrote: > > I think I found a error polymorphism in django 1.7, field slug exist in > > _meta.fields and run filter return error "FieldError: Cannot resolve > > keyword 'slug' into field. Choices". > > > > Example: https://gist.github.com/avelino/793bdaf9f9732314912a > > > > > > Slugged(abstract): > > > https://github.com/opps/opps/blob/8e58a60c3cfea75b5cc4455d247a75b26f995b58/opps/core/models/core.py#L80 > > > > Article(abstract): > > > https://github.com/opps/opps/blob/8e58a60c3cfea75b5cc4455d247a75b26f995b58/opps/containers/abstracts/articles.py#L12 > > > > Post: > > > https://github.com/opps/opps/blob/8e58a60c3cfea75b5cc4455d247a75b26f995b58/opps/containers/types/posts.py#L8 > > > > Container: > > > https://github.com/opps/opps/blob/8e58a60c3cfea75b5cc4455d247a75b26f995b58/opps/containers/models/core.py#L29 > > > > > > class Container(Publishable, Channeling): > > class Article(Container, Slugged, Tagged): > > class Post(Article): > > > > In Post not exist slug (on filtrer) and _meta.fields exist! > > It certainly looks like there's a bug there somewhere, but there's so > much going on in your code (including inheriting from PolymorphicModel, > a third-party base class) that it's hard to say where the bug might be > (and whether it's even a bug in Django at all) without doing some direct > exploration (i.e. using pdb to trace into the filter call and figure out > exactly why a FieldError is being raised for 'slug' when a field of that > name appears to exist). I think if you want a resolution here, you'll > likely need to do that exploration yourself and try to narrow down the > source of the bug so that you can reproduce it with a simplest-case > example. > > Carl > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at http://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/541AF60D.6020502%40oddbird.net > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAHWh-o%2Bi3%2BYPu8fn%3DrGEzvDskckkMeBNUdG3eXDadQcRr88wUQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.