From 702dbf5e612afdd517c80d8ab9e592bc745da320 Mon Sep 17 00:00:00 2001 From: fonfon Date: Mon, 4 May 2015 10:32:53 +0200 Subject: [PATCH] Renamed default services to standard services --- plinth/modules/pagekite/forms.py | 6 +++--- plinth/modules/pagekite/urls.py | 4 ++-- plinth/modules/pagekite/views.py | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plinth/modules/pagekite/forms.py b/plinth/modules/pagekite/forms.py index be998cf67..bd1c07843 100644 --- a/plinth/modules/pagekite/forms.py +++ b/plinth/modules/pagekite/forms.py @@ -99,12 +99,12 @@ for your account if no secret is set on the kite')) _run(['restart']) -class DefaultServiceForm(forms.Form): +class StandardServiceForm(forms.Form): """Creates a form out of PREDEFINED_SERVICES""" def __init__(self, *args, **kwargs): """Add the fields from PREDEFINED_SERVICES""" - super(DefaultServiceForm, self).__init__(*args, **kwargs) + super(StandardServiceForm, self).__init__(*args, **kwargs) kite = get_kite_details() for name, service in PREDEFINED_SERVICES.items(): if name in ('http', 'https'): @@ -208,7 +208,7 @@ class AddCustomServiceForm(BaseCustomServiceForm): is_predefined = False if is_predefined: msg = _("""This service is available as a default service. Please - use the 'Default Services' page to enable it.""") + use the 'Standard Services' page to enable it.""") raise forms.ValidationError(msg) return cleaned_data diff --git a/plinth/modules/pagekite/urls.py b/plinth/modules/pagekite/urls.py index 90b5ec3a7..bed6835f6 100644 --- a/plinth/modules/pagekite/urls.py +++ b/plinth/modules/pagekite/urls.py @@ -22,7 +22,7 @@ URLs for the PageKite module from django.conf.urls import patterns, url from django.contrib.auth.decorators import login_required -from .views import DefaultServiceView, CustomServiceView, ConfigurationView, \ +from .views import StandardServiceView, CustomServiceView, ConfigurationView, \ DeleteServiceView, index @@ -32,7 +32,7 @@ urlpatterns = patterns( # pylint: disable-msg=C0103 url(r'^apps/pagekite/configure/$', login_required(ConfigurationView.as_view()), name='configure'), url(r'^apps/pagekite/services/default$', - login_required(DefaultServiceView.as_view()), name='default-services'), + login_required(StandardServiceView.as_view()), name='default-services'), url(r'^apps/pagekite/services/custom$', login_required(CustomServiceView.as_view()), name='custom-services'), url(r'^apps/pagekite/services/custom/delete$', diff --git a/plinth/modules/pagekite/views.py b/plinth/modules/pagekite/views.py index 8637b953f..4d347c29f 100644 --- a/plinth/modules/pagekite/views.py +++ b/plinth/modules/pagekite/views.py @@ -26,7 +26,7 @@ from django.views.generic.edit import FormView from plinth import package from .util import get_pagekite_config, get_pagekite_services, \ get_kite_details, prepare_service_for_display -from .forms import ConfigurationForm, DefaultServiceForm, \ +from .forms import ConfigurationForm, StandardServiceForm, \ AddCustomServiceForm, DeleteCustomServiceForm @@ -36,7 +36,7 @@ subsubmenu = [{'url': reverse_lazy('pagekite:index'), {'url': reverse_lazy('pagekite:configure'), 'text': _('Configure PageKite')}, {'url': reverse_lazy('pagekite:default-services'), - 'text': _('Default Services')}, + 'text': _('Standard Services')}, {'url': reverse_lazy('pagekite:custom-services'), 'text': _('Custom Services')}] @@ -105,10 +105,10 @@ class CustomServiceView(ContextMixin, TemplateView): return self.render_to_response(context) -class DefaultServiceView(ContextMixin, FormView): +class StandardServiceView(ContextMixin, FormView): template_name = 'pagekite_default_services.html' - title = 'PageKite Default Services' - form_class = DefaultServiceForm + title = 'PageKite Standard Services' + form_class = StandardServiceForm success_url = reverse_lazy('pagekite:default-services') def get_initial(self): @@ -116,7 +116,7 @@ class DefaultServiceView(ContextMixin, FormView): def form_valid(self, form): form.save(self.request) - return super(DefaultServiceView, self).form_valid(form) + return super(StandardServiceView, self).form_valid(form) class ConfigurationView(ContextMixin, FormView):