Commits

Anonymous committed 9b3fdbd

some cleanup

  • Participants
  • Parent commits ddb1955

Comments (0)

Files changed (3)

File pysourcesearch/models.py

         
     @property
     def contents(self):
-        if hasattr(self, '_contents'):
-            return self._contents
-        else:
+        if not hasattr(self, '_contents'):
             fi = open(self.path)
             self._contents = fi.read()
             fi.close()
     def filename(self):
         return self.path.split(path.sep)[-1]
 
-def FileFactory(request):
-    from catalog import catalogs
-    docid = int(request.matchdict['docid'])
-    return File(catalogs['Plone'].document_map.get_metadata(docid)['abspath'])
-
 class MyModel(object):
     pass
 

File pysourcesearch/templates/search.pt

       xmlns:tal="http://xml.zope.org/namespaces/tal">
 <head>
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<title>Application</title>
+<title>pysourcesearch</title>
 <meta name="keywords" content="python web application" />
 <meta name="description" content="repoze.bfg web application" />
 <link href="${request.application_url}/static/default.css" rel="stylesheet" type="text/css" />

File pysourcesearch/templates/view.pt

       xmlns:tal="http://xml.zope.org/namespaces/tal">
 <head>
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<title>PySourceSearch</title>
+<title>pysourcesearch</title>
 <meta name="keywords" content="python web application" />
 <meta name="description" content="repoze.bfg web application" />
 <link href="${request.application_url}/static/default.css" rel="stylesheet" type="text/css" />