Commits

Stefan Scherfke committed b8857b2

Minor code cleanups.

  • Participants
  • Parent commits 318a260

Comments (0)

Files changed (3)

File sphinxdoc/forms.py

     def __init__(self, *args, **kwargs):
         slug = kwargs.pop('slug')
         project = Project.objects.get(slug=slug)
-        kwargs['searchqueryset'] = (kwargs.get('searchqueryset') or SearchQuerySet()).models(Document).filter(
-                project=project.id)
+        kwargs['searchqueryset'] = (kwargs.get('searchqueryset') or
+                SearchQuerySet()).models(Document).filter(project=project.id)
 
         SearchForm.__init__(self, *args, **kwargs)

File sphinxdoc/urls.py

         name='doc-search',
     ),
     url(
-        r'^(?P<slug>[\w-]+)/(?P<type_>_images|_static|_downloads|_source)/(?P<path>.*)$',
+        r'^(?P<slug>[\w-]+)/(?P<type_>_images|_static|_downloads|_source)/' + \
+                r'(?P<path>.+)/$',
         'sphinx_serve',
     ),
     url(

File sphinxdoc/views.py

                 searchqueryset=self.searchqueryset, load_all=self.load_all)
 
     def extra_context(self):
+        """
+        Adds the project, the contents of ``globalcontext.json`` and the
+        update date as extra context.
+
+        """
         project = Project.objects.get(slug=self.slug)
         return {
             'project': project,