[Grok-dev] Lying user warnings with shared template dirs
cklinger at novareto.de
Sat Jan 30 07:28:27 EST 2010
thanks for bringing this up to the table, you are right this is a bit
confusing. I am +1 to fix this. Please let me know if I can help with
> The template problem has been corrected by Martijn and Vincent, during
> the sprint in England and still needs to be merged, if I recall
> 2010/1/30 Uli Fouquet<uli at gnufix.de>:
>> Hi there,
>> When one defines a template dir on module level that is shared (or not
>> shared) with another module, grokcore.views template registry easily
>> emits a user warning:
>> ...UserWarning: Found the following unassociated template(s) when
>> grokking 'cave': food. Define view classes inheriting from
>> grok.View to enable the template(s)
>> If, for better orientation, you decide to put all templates for all
>> modules in, say, a `template/` dir, by::
>> you easily get tons of false alerts of the above type. And there is no
>> way to go around these warnings (at least none that I know).
>> This is confusing and even a lie, when a certain template was associated
>> with a class from another module than the one currently grokked.
>> The real solution would, of course, be to grok all modules first, and
>> then decide, which templates have really no associated view. This,
>> however, would require a complete different 'grokking-workflow'.
>> A quick workaround would, however, be to disable the above messages for
>> modules that explicitly set the template dir. Templates in a shared
>> template dir that have no associate wouldn't emit a warning then, but
>> warnings for other templates would be surpressed.
>> I'd love to implement the latter in grokcore.view, but would like to get
>> your opinions first.
>> Best regards,
>> Grok-dev mailing list
>> Grok-dev at zope.org
More information about the Grok-dev