deluge: Minor fixes and styling

- Updated comments

- Start the daemon before enabling Apache configuration.

- Warn the user about editing the Apache configuration for Deluge.

- Other minor updates.
This commit is contained in:
Sunil Mohan Adapa committed 2015-05-10 13:44:33 +05:30
1 parent 6a57dc78f3
commit a6fa7abbad
5 files changed
+17 -11

No files matched your search

+2 -2
View File
@@ -16,7 +16,7 @@
#
"""
Plinth module to configure a Deluge web client
Plinth module to configure a Deluge web client.
"""
from gettext import gettext as _
@@ -28,7 +28,7 @@ depends = ['plinth.modules.apps']
def init():
"""Initialize the BitTorrent module."""
"""Initialize the Deluge module."""
menu = cfg.main_menu.get('apps:index')
menu.add_urlname(_('BitTorrent (Deluge)'), 'glyphicon-magnet',
'deluge:index', 60)
+1 -1
View File
@@ -26,5 +26,5 @@ from gettext import gettext as _
class DelugeForm(forms.Form):
"""Deluge configuration form."""
enabled = forms.BooleanField(
label=_('Enable Deluge web client'),
label=_('Enable Deluge'),
required=False)
+4 -4
View File
@@ -49,19 +49,19 @@
<p>
{% if status.is_running %}
<span class="running-status active"></span> deluge-web is running
<form class="form" method="post" action="{% url 'deluge:stop' %}">
{% csrf_token %}
<input type="submit" class="btn btn-primary"
value="Stop deluge-web &raquo;"/>
<input type="submit" class="btn btn-primary" value="Stop deluge-web"/>
</form>
{% else %}
<span class="running-status inactive"></span> deluge-web is not running
<form class="form" method="post" action="{% url 'deluge:start' %}">
{% csrf_token %}
<input type="submit" class="btn btn-primary"
value="Start deluge-web &raquo;"/>
<input type="submit" class="btn btn-primary" value="Start deluge-web"/>
</form>
{% endif %}
+1 -1
View File
@@ -78,7 +78,7 @@ def get_status():
enabled = (output.strip() == 'yes')
output = actions.run('deluge', ['is-running'])
is_running = ('yes' in output.strip())
is_running = (output.strip() == 'yes')
status = {'enabled': enabled,
'is_running': is_running}