mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
Move users module to python logging
This commit is contained in:
parent
588e3a62bd
commit
eba3021765
@ -7,11 +7,15 @@ from django.template import RequestContext
|
||||
from django.template.loader import render_to_string
|
||||
from django.template.response import TemplateResponse
|
||||
from gettext import gettext as _
|
||||
import logging
|
||||
|
||||
import cfg
|
||||
from ..lib.auth import add_user
|
||||
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def init():
|
||||
"""Intialize the module"""
|
||||
menu = cfg.main_menu.find('/sys')
|
||||
@ -128,8 +132,7 @@ def _apply_edit_changes(request, data):
|
||||
username = field.split('delete_user_')[1]
|
||||
|
||||
requesting_user = request.user.username
|
||||
cfg.log.info('%s asked to delete %s' %
|
||||
(requesting_user, username))
|
||||
LOGGER.info('%s asked to delete %s', requesting_user, username)
|
||||
|
||||
if username == requesting_user:
|
||||
messages.error(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user