Hi All,
So, the symptom of this is an exception as follows when the config commits:
ConfigurationConflictError: Conflicting configuration actions
For: ('view', None, '', None, <InterfaceClass
pyramid.interfaces.IView>, None, None, None, 'user', None, False, None,
None, None)
('...views.py', 119, '<module>', 'class MyView(...):')
('...views.py', 119, '<module>', 'class MyView(...):')
This happens because MyView is decorated with a view_config to register it.
However, I have another module (a test module as it happens, and yes I
know importing from code under test at module level is evil in some
peoples' eyes, but it's certainly legit to import from a module that
contains a view class with a view_config decorator, and I believe that
will trigger the same problem) that imports the view class and that
import, at the time of the config.scan() appears to cause the duplicate
registration above.
This feels like a bug to me but I thought I'd throw it out here in case
I missed something...
My gut feels it that view_config (and likely any venusian thing) should
do nothing if the thing it's decorating has already been visited...
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are subscribed to the Google Groups
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-devel?hl=en.