mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Convert firstboot pages to Django forms
This commit is contained in:
1 parent
5461694b10
commit
b50a99b1e4
5 files changed
+255
-102
No files matched your search
@@ -37,6 +37,11 @@ from plugin_mount import PagePlugin
|
||||
import util
|
||||
|
||||
|
||||
def get_hostname():
|
||||
"""Return the hostname"""
|
||||
return socket.gethostname()
|
||||
|
||||
|
||||
class TrimmedCharField(forms.CharField):
|
||||
"""Trim the contents of a CharField"""
|
||||
def clean(self, value):
|
||||
@@ -122,7 +127,7 @@ class Configuration(PagePlugin):
|
||||
@staticmethod
|
||||
def get_status():
|
||||
"""Return the current status"""
|
||||
return {'hostname': socket.gethostname(),
|
||||
return {'hostname': get_hostname(),
|
||||
'time_zone': util.slurp('/etc/timezone').rstrip()}
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in new issue
Block a user