gitweb: Minor fixes after review

- Since Wiki Commons and Icons project seems to be referring to each other for
  license about the git icon, point to the upstream git as source for copyright.

- Rename the is_running() method so that it won't clash with the semantics of
  is_running method in other components.

- Fix incorrect call to have_public_repos() in is_enabled() method for gitweb
  auth configuration.

- Use {{ block.super }} to avoid repeating inherited block.

- Send the repository data as context data rather than form data in AppView.
  This seems more appropriate.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa committed 2019-10-19 19:13:57 -07:00
1 parent 1b9dea4033
commit 8d4614c3e2
4 files changed
+14 -23

No files matched your search

+5 -5
View File
@@ -45,12 +45,12 @@ class GitwebAppView(views.AppView):
show_status_block = False
template_name = 'gitweb_configure.html'
def get_initial(self):
"""Return the status of the service to fill in the form."""
initial = super().get_initial()
def get_context_data(self, *args, **kwargs):
"""Add repositories to the context data."""
context = super().get_context_data(*args, **kwargs)
gitweb.app.update_repo_list()
initial['repos'] = gitweb.app.repos
return initial
context['repos'] = gitweb.app.repos
return context
class CreateRepoView(SuccessMessageMixin, FormView):