mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
Move views to python logging
This commit is contained in:
parent
1e4deb7bb9
commit
431a585636
6
views.py
6
views.py
@ -20,11 +20,15 @@ Main Plinth views
|
||||
"""
|
||||
|
||||
from django.http.response import HttpResponseRedirect
|
||||
import logging
|
||||
|
||||
import cfg
|
||||
from withsqlite.withsqlite import sqlite_db
|
||||
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def index(request):
|
||||
"""Serve the main index page"""
|
||||
# TODO: Move firstboot handling to firstboot module somehow
|
||||
@ -36,7 +40,7 @@ def index(request):
|
||||
return HttpResponseRedirect(cfg.server_dir + '/firstboot')
|
||||
|
||||
if database['state'] < 5:
|
||||
cfg.log('First boot state = %d' % database['state'])
|
||||
LOGGER.info('First boot state - %d', database['state'])
|
||||
return HttpResponseRedirect(
|
||||
cfg.server_dir + '/firstboot/state%d' % database['state'])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user