Don't break when trying to check if TemplateHooks apply on 404s.

Review Request #6035 — Created June 28, 2014 and submitted

Information

Djblets
master

Reviewers

Don't break when trying to check if TemplateHooks apply on 404s.

On 404 pages, the request doesn't have a resolver_match. For TemplateHooks
that apply to base.html (like the base-css hook point, for example), this
was problematic because 404.html extends base.html, and so any TemplateHook
that injects itself in a base hook point on only certain pages would cause
breakages since the resolver_match couldn't be checked to see if the
TemplateHook should actually apply.

I'm not exactly sure how to test this just yet because I'm having difficulty testing
the 404 page since that requires DEBUG = False, and I'm getting 500's on my dev server
any time I try to browse to any page. :/

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/extensions/hooks.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/extensions/hooks.py
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
mike_conley
Review request changed
Status:
Completed
Change Summary:
Thanks - landed as c729e3c4.