Thanks
Philip
I can't say I've seen the error you report.
My immediate question when I see reports like this is "what else are
you doing?". Django has an extensive test suite, and things like m2m
fields are tested very heavily. Outside of Django's test suite, there
are thousands of applications out there using Django, and many of them
are using Django 1.3, and this is the first time that this particular
problem has been reported. So, you are clearly doing *something* that
is unusual (whether you know it's unusual or not).
What we need is a reproducible test case -- the smallest possible
sample of code that works under 1.2.7, but breaks under 1.3.1. That
will provide us the basis on which to debug the problem, and form the
core of a regression test to make sure the problem doesn't occur again
in the future.
Yours,
Russ Magee %-)
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
On Fri, Sep 23, 2011 at 3:40 PM, Philip <pmount...@formac.net> wrote:
> FieldError: Cannot resolve keyword 'email_config_set' into field.
> Choices are: id, name, site, type
>
> Any ideas/solutions/pointers/tips would be most welcome.
Yes, I've seen similar problems in two sites I'm running. I suspect it
has to do with dynamically created models and startup timing effects
in our case. I'm not sure when it started and it's really hard to test
because it only happens in production (mod_wsgi / DEBUG=False) and I
don't have a consistent view of when the problem happens yet.
What we are doing in FeinCMS against it is trying to remove the caches
on Model._meta when new models are being created; this works for us,
but isn't all that nice. I'm running the following code in production
and will be waiting a few hours / days for the problem to manifest
itself again, hoping it wont:
https://github.com/matthiask/feincms/commit/f2de708a09f8b6cf4fdbca6b3583747b6ebbc2e2
Matthias
-- Philip Mountifield Formac Electronics Ltd tel +44 (0) 1225 837333 fax +44 (0) 1225 430995 pmount...@formac.net www.formac.net www.telgas.net
I'll take a look at your github, thanks for sharing the link.
Out of interest, with respect to David's comment about postgres
versions, do you use version 8.1 or another?
Phil
We don't (unfortunately, but that's a different topic) on the site in question.
Matthias
(Sorry for pressing send too early.)
We don't use postgresql at all (unfortunately, but that's a different
Firstly, I updated to PG 8.4, and found the the issue is still there.
Secondly I had a look at Matthias' code on github and tries a few hacks.
I found that clearing the caches on the opposite side of the many to
many relationship solved the problem.
E.g. for "an_instance.a_many_to_many_field" I cleared the caches in
"an_instance.a_many_to_many_field.model._meta"
Now I'm going to look into the creation of the dynamic models to see
what has changed between Django 1.2 and 1.3 in how this happens and
their sequence.
Philip