Hi,
I've experienced this issue as well using classes for rendering views when the 
class inherits from other class which already have other view declared. For 
example:

@view_config( .... )
class myViewClass():
...


@view_config( .... )
class myOtherView(myViewClass):
....

I've workarround it by using more generic meta-classes but it should work, 
isn't it?
Greetings,
V.

On 1 Mar 2011, at 20:01, Chris Withers wrote:

> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/pylons-devel?hl=en.
> 

VĂ­ctor.
UPC Plone Team - Barcelona
IRC/twitter: sneridagh

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to