Add logging framework usage example
This commit is contained in:
@@ -10,7 +10,7 @@ from django_registration.views import RegistrationView
|
||||
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
from zenpy import Zenpy
|
||||
import logging
|
||||
|
||||
|
||||
class CustomRegistrationView(RegistrationView):
|
||||
@@ -69,4 +69,6 @@ def profile_page(request):
|
||||
|
||||
|
||||
def main_page(request):
|
||||
logger = logging.getLogger('main.index')
|
||||
logger.info('Index page opened')
|
||||
return render(request, 'pages/index.html')
|
||||
|
||||
Reference in New Issue
Block a user