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 [email protected].
To post to this group, send email to [email protected].
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.

Reply via email to