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.pyset 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_staffhave 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}' }
Release files for django-logui 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_logui-0.1.2.tar.gz | 92.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_logui-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 186.8 kB
Release files / django_logui-0.1.2.tar.gz
| Download URL | django_logui-0.1.2.tar.gz |
|---|---|
| Size | 92.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a02b5728814b8a6acebb34e5df97e5b2013d4e7a3a52123c41d3a33ba23c2cd4
|
|
BLAKE2b-256 checksum How to use checksums |
d76d8f3c4e3296687889c90d83e3662849fac141594edd06b2d0db7626c45cc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.6
|
Release files / django_logui-0.1.2-py3-none-any.whl
| Download URL | django_logui-0.1.2-py3-none-any.whl |
|---|---|
| Size | 94.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0f91702fbaf5c1e89d43df0727fa589f79dee6ba7b9bb5d853747fb01653d07
|
|
BLAKE2b-256 checksum How to use checksums |
b081c9db9cd95fde8aaeb2e94a32e16f8a38de87a38e77f71563055e90d07f5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.6
|