Views are not registered from inherited views

Bug #243144 reported by Andreas Jung
2
Affects Status Importance Assigned to Milestone
grok
Won't Fix
Low
Brandon Rhodes
1.0
Won't Fix
Low
Brandon Rhodes
1.1
Won't Fix
Medium
Martijn Faassen

Bug Description

Consider the following:

class SomeView(grok.View):
    ..

class RSS(SomeView):
    grok.context(foo)
    grok.name('rss')

   def render(self):
    ....

The grokking machinery does not tie the 'RSS' to the the 'foo' class if the base class of RSS is inherited from
another view. Replacing the base class SomeView with grok.View however works as expected.

Bug or feature (Grok 0.13)?

Revision history for this message
Martijn Faassen (faassen) wrote : Re: [Bug 243144] [NEW] Views are not registered from inherited views

I cannot confirm this bug. I tried the following:

import grok

class viewbug(grok.Application, grok.Container):
    pass

class Index(grok.View):
    pass # see app_templates/index.pt

class SomeView(grok.View):
    def render(self):
        return "SomeView"

class RSS(SomeView):
    def render(self):
        return "RSS"

and I can access both 'someview' and 'rss'.

todd (todd-infrae)
Changed in grok:
assignee: nobody → brandon-rhodes
milestone: none → 1.0
Revision history for this message
Martijn Faassen (faassen) wrote :

Andreas, any feedback on this issue? Perhaps it has something to do with the whole view subclassing issue in general which JW and I are currently working on.

Revision history for this message
Andreas Jung (ajung) wrote :

The issue is likely obsolete (perhaps my initial issue was wrong) - no idea. I am using subclassed views for a while with the latest
Grok versions.

Changed in grok:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.