title: Snap Framework: Custom snaplet handler won't render template
body: <p>I'm just getting started with writing custom snaplets and hit a road block.  I have the following basic snaplet which has a "roles" template located in the "snaplets/admin-pg/snaplets/heist/templates". Can someone tell me why the handleUsers function does not render the "roles" template?  I get a  "No handler accepted '/pgadmin/users' " error. I'm sure I'm missing something very basic.  Thanks.</p>
  
  <p>My main app is defined as follows.  It is an instance of HasHeist</p>
  
  <pre><code>data App = App
      { _heist :: Snaplet (Heist App)
      , _pgadmin :: Snaplet (Admin App)
      }
  </code></pre>
  
  <p>My initializtion code for the snaplet in the main App ("Site.hs") is:</p>
  
  <pre><code>h &lt;- nestSnaplet "" heist $ heistInit "templates"
  z &lt;- nestSnaplet "pgadmin" pgadmin $ adminPGInit h
  </code></pre>
  
  <p>Custom snaplet code... </p>
  
  <pre><code>data Admin b = Admin { name :: String}
  
  adminPGInit :: HasHeist a =&gt; Snaplet (Heist a) -&gt; SnapletInit a (Admin a)
  adminPGInit h = makeSnaplet "admin-pg" description datadir $ do
    config &lt;- getSnapletUserConfig
    fp &lt;- getSnapletFilePath  
    addTemplatesAt h "" fp
    addRoutes [ ("/users", handleUsers) 
              , ("/foo", handleFoo)]
  
    return $ Admin "Admin Snaplet"
      where
        description = "PostgreSQL Admin"
        datadir = Just $ liftM (++"/resources") getDataDir
  
  
  
  handleUsers :: HasHeist b =&gt; Handler b (Admin b) ()    
  handleUsers = do
    render "roles"
  
  handleFoo :: HasHeist b =&gt; Handler b (Admin b) () 
  handleFoo = writeBS "foo from admin"
  </code></pre>