Commits

mitar committed b72d1d3

Added project environment also to search view.

  • Participants
  • Parent commits 82742fd

Comments (0)

Files changed (1)

File sphinxdoc/views.py

         'env': json.load(open(
                 os.path.join(project.path, BUILDDIR,
                 'globalcontext.json'), 'rb')),
-        'update_date':  datetime.datetime.fromtimestamp(
+        'update_date': datetime.datetime.fromtimestamp(
                 os.path.getmtime(os.path.join(project.path, BUILDDIR,
                 'last_build'))),
         'search': urlresolvers.reverse('doc-search', kwargs={'slug': slug}),
     def extra_context(self):
         return {
             'project': Project.objects.get(slug=self.slug),
+            'env': json.load(open(
+                    os.path.join(project.path, BUILDDIR,
+                    'globalcontext.json'), 'rb')),
+            'update_date': datetime.datetime.fromtimestamp(
+                    os.path.getmtime(os.path.join(project.path, BUILDDIR,
+                    'last_build'))),
         }