From c04897be8bc672528c41bd9733874b406a3e2716 Mon Sep 17 00:00:00 2001 From: fonfon Date: Wed, 21 Jan 2015 12:59:47 +0000 Subject: [PATCH] Moved pagekit url creation to pagekite module plus some minor cleanup --- actions/pagekite | 4 +- .../templates/pagekite_custom_services.html | 12 ++--- .../pagekite/templatetags/pagekite_extras.py | 44 +++++++++++++++++++ plinth/modules/pagekite/util.py | 28 ++++++------ plinth/modules/pagekite/views.py | 7 +-- plinth/templatetags/plinth_extras.py | 19 -------- 6 files changed, 70 insertions(+), 44 deletions(-) create mode 100644 plinth/modules/pagekite/templatetags/pagekite_extras.py diff --git a/actions/pagekite b/actions/pagekite index 34bbaadaa..3891802d7 100755 --- a/actions/pagekite +++ b/actions/pagekite @@ -223,10 +223,10 @@ def subcommand_add_service(arguments): root = get_new_service_path(params['protocol']) # TODO: after adding a service, augeas fails writing the config; - # so do it manually here + # so add the service_on entry manually instead path = convert_augeas_path_to_filepath(root) with open(path, 'a') as servicefile: - line = "service_on = %s" % deconstruct_params(params) + line = "\nservice_on = %s\n" % deconstruct_params(params) servicefile.write(line) diff --git a/plinth/modules/pagekite/templates/pagekite_custom_services.html b/plinth/modules/pagekite/templates/pagekite_custom_services.html index d865d9d40..ee0ff9ca3 100644 --- a/plinth/modules/pagekite/templates/pagekite_custom_services.html +++ b/plinth/modules/pagekite/templates/pagekite_custom_services.html @@ -20,7 +20,7 @@ {% load bootstrap %} -{% load plinth_extras %} +{% load pagekite_extras %} {% block page_head %}