names: Add description

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Joseph Nuthalapati 2019-02-13 05:25:00 +05:30 committed by Sunil Mohan Adapa
parent be46542f87
commit ccc4bd120b
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 18 additions and 5 deletions

View File

@ -22,8 +22,10 @@ import logging
from django.utils.translation import ugettext_lazy as _
from plinth import cfg
from plinth.menu import main_menu
from plinth.signals import domain_added, domain_removed
from plinth.utils import format_lazy
from .manifest import backup
@ -46,6 +48,15 @@ logger = logging.getLogger(__name__)
manual_page = 'NameServices'
description = [
format_lazy(
_('Name Services provides an overview of the ways {box_name} can be '
'reached from the public Internet: domain name, Tor hidden service, '
'and Pagekite. For each type of name, it is shown whether the HTTP, '
'HTTPS, and SSH services are enabled or disabled for incoming '
'connections through the given name.'), box_name=(cfg.box_name))
]
def init():
"""Initialize the names module."""

View File

@ -31,11 +31,13 @@ def index(request):
"""Serve name services page."""
status = get_status()
return TemplateResponse(request, 'names.html', {
'title': names.name,
'manual_page': names.manual_page,
'status': status
})
return TemplateResponse(
request, 'names.html', {
'title': names.name,
'description': names.description,
'manual_page': names.manual_page,
'status': status
})
def get_status():