You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

django-logui

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-logui

Flexible, fast and productive UI for logging in Django

0.1.2
Source
pipPyPI
Maintainers
1

Django LogUi

Sometimes I use this in different projects, so I decided to put it on pypi

Installation

pip install django-logui

Settings

  • Add the application to the project.

    INSTALLED_APPS = [
        #...
        'adjango',
        'logui',
    ]
    
  • In settings.py set the params

    # settings.py
    from os.path import join
    from logui.utils import check_loggers
    
    
    # LOGS_DIR will be scanned for .log files
    # Nearest folders are also scanned.
    # LOGS_DIR *required
    LOGS_DIR = join(BASE_DIR, 'logs')
    
    LOGGING = ... # ur logging
    # Console report about existing loggers
    check_loggers(LOGGING)
    

    Read more about adjango

  • Add routes

    Only is_staff have access.

    from django.urls import path, include
    # Not use django.conf.settings
    from logui.conf import LOGUI_URL_PREFIX
    
    urlpatterns = [
        ...
        path(LOGUI_URL_PREFIX, include('logui.routes.views')),
    ]
    
  • Open https://localhost:8000/logui/

    https://localhost:8000/settings.LOGUI_URL_PREFIX

  • Additional

    # only for request response middleware
    LOGUI_REQUEST_RESPONSE_LOGGER_NAME = 'global'
    MIDDLEWARE = [
      ...
      'adjango.middleware.IPAddressMiddleware',  # first IP middleware from adjango
      'logui.middleware.RequestResponseLoggerMiddleware',  # second logui middleware
      ...
    ]
    
    # not required
    LOGUI_URL_PREFIX = 'logui/'
    LOGUI_CONTROLLERS_SETTINGS = {
        'auth_required': True,
        'log_name': False,
        'not_auth_redirect': f'/admin/login/?next=/{LOGUI_URL_PREFIX}'
    }
    

Keywords

django-logui django utils funcs features logs logging logger

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.