diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index a67118b..203236d 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,4 +1,3 @@ -github: [agusmakmun] patreon: ko_fi: liberapay: diff --git a/.travis.yml b/.travis.yml index e9211e6..1f508f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,26 +3,19 @@ sudo: false matrix: include: - - python: 2.7 - env: DJANGO=1.10.* - - python: 2.7 - env: DJANGO=1.11.* - - - python: 3.5 - env: DJANGO=1.10.* - - python: 3.5 - env: DJANGO=1.11.* - python: 3.5 env: DJANGO=2.0.* - python: 3.5 env: DJANGO=2.1.* - python: 3.5 env: DJANGO=2.2.* + - python: 3.5 + env: DJANGO=3.0.* + - python: 3.5 + env: DJANGO=3.1.* + - python: 3.5 + env: DJANGO=3.2.* - - python: 3.6 - env: DJANGO=1.10.* - - python: 3.6 - env: DJANGO=1.11.* - python: 3.6 env: DJANGO=2.0.* - python: 3.6 @@ -33,11 +26,9 @@ matrix: env: DJANGO=3.0.* - python: 3.6 env: DJANGO=3.1.* + - python: 3.6 + env: DJANGO=3.2.* - - python: 3.7 - env: DJANGO=1.10.* - - python: 3.7 - env: DJANGO=1.11.* - python: 3.7 env: DJANGO=2.0.* - python: 3.7 @@ -48,10 +39,38 @@ matrix: env: DJANGO=3.0.* - python: 3.7 env: DJANGO=3.1.* + - python: 3.7 + env: DJANGO=3.2.* + + - python: 3.8 + env: DJANGO=2.0.* + - python: 3.8 + env: DJANGO=2.1.* + - python: 3.8 + env: DJANGO=2.2.* + - python: 3.8 + env: DJANGO=3.0.* + - python: 3.8 + env: DJANGO=3.1.* + - python: 3.8 + env: DJANGO=3.2.* + + - python: 3.9 + env: DJANGO=2.0.* + - python: 3.9 + env: DJANGO=2.1.* + - python: 3.9 + env: DJANGO=2.2.* + - python: 3.9 + env: DJANGO=3.0.* + - python: 3.9 + env: DJANGO=3.1.* + - python: 3.9 + env: DJANGO=3.2.* - os: osx language: generic - env: DJANGO=3.1.* + env: DJANGO=3.2.* # Perform the manual steps on OSX to install Python3 and activate venv: # Since Python versions have been tested on Linux and it is only a matter of diff --git a/README.rst b/README.rst index b5dd54f..221de86 100644 --- a/README.rst +++ b/README.rst @@ -36,7 +36,7 @@ Quick start :: - path('admin/log_viewer/', include('log_viewer.urls')), + path('logs/', include('log_viewer.urls')), 4. In your ``settings.py`` file create the following value @@ -48,7 +48,7 @@ Quick start LOG_VIEWER_FILES_DIR = os.path.join(BASE_DIR, '../logs') LOG_VIEWER_MAX_READ_LINES = 1000 # total log lines will be read LOG_VIEWER_PAGE_LENGTH = 25 # total log lines per-page - LOG_VIEWER_PATTERNS = [']OFNI[', ']GUBED[', ']GNINRAW[', ']RORRE[', ']LACITIRC['] + LOG_VIEWER_PATTERNS = ['[INFO]', '[DEBUG]', '[WARNING]', '[ERROR]', '[CRITICAL]'] # Optionally you can set the next variables in order to customize the admin: @@ -73,7 +73,7 @@ Quick start python manage.py collectstatic -7. Start the development server and visit http://127.0.0.1:8000/admin/log_viewer/ +7. Start the development server and visit http://127.0.0.1:8000/logs/ .. |pypi version| image:: https://img.shields.io/pypi/v/django-log-viewer.svg diff --git a/log_viewer/__init__.py b/log_viewer/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/log_viewer/locale/en/LC_MESSAGES/django.po b/log_viewer/locale/en/LC_MESSAGES/django.po index 7588ae8..39e8880 100644 --- a/log_viewer/locale/en/LC_MESSAGES/django.po +++ b/log_viewer/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-30 17:54+0700\n" +"POT-Creation-Date: 2021-07-06 21:39+0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,35 +18,36 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: templates/log_viewer/logfile_viewer.html:6 -msgid "Home" -msgstr "" - -#: templates/log_viewer/logfile_viewer.html:8 -#: templates/log_viewer/logfile_viewer.html:39 +#: templates/log_viewer/logfile_viewer.html:3 +#: templates/log_viewer/logfile_viewer.html:9 +#: templates/log_viewer/logfile_viewer.html:35 msgid "Django Log Viewer" msgstr "" -#: templates/log_viewer/logfile_viewer.html:32 -msgid "Log Files" +#: templates/log_viewer/logfile_viewer.html:7 +msgid "Home" msgstr "" -#: templates/log_viewer/logfile_viewer.html:41 +#: templates/log_viewer/logfile_viewer.html:37 msgid "Download all Log Files" msgstr "" -#: templates/log_viewer/logfile_viewer.html:42 +#: templates/log_viewer/logfile_viewer.html:38 msgid "Download this Log File" msgstr "" -#: templates/log_viewer/logfile_viewer.html:48 +#: templates/log_viewer/logfile_viewer.html:44 msgid "No." msgstr "" -#: templates/log_viewer/logfile_viewer.html:49 +#: templates/log_viewer/logfile_viewer.html:45 msgid "Log entries" msgstr "" -#: templates/log_viewer/logfile_viewer.html:53 +#: templates/log_viewer/logfile_viewer.html:49 msgid "No entries!" msgstr "" + +#: templates/log_viewer/logfile_viewer.html:55 +msgid "Log Files" +msgstr "" diff --git a/log_viewer/locale/id/LC_MESSAGES/django.po b/log_viewer/locale/id/LC_MESSAGES/django.po index 7a8882a..ebf44d4 100644 --- a/log_viewer/locale/id/LC_MESSAGES/django.po +++ b/log_viewer/locale/id/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-30 17:54+0700\n" +"POT-Creation-Date: 2021-07-06 21:39+0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,35 +18,36 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: templates/log_viewer/logfile_viewer.html:6 -msgid "Home" -msgstr "Beranda" - -#: templates/log_viewer/logfile_viewer.html:8 -#: templates/log_viewer/logfile_viewer.html:39 +#: templates/log_viewer/logfile_viewer.html:3 +#: templates/log_viewer/logfile_viewer.html:9 +#: templates/log_viewer/logfile_viewer.html:35 msgid "Django Log Viewer" msgstr "Penampil Log Django" -#: templates/log_viewer/logfile_viewer.html:32 -msgid "Log Files" -msgstr "File log" +#: templates/log_viewer/logfile_viewer.html:7 +msgid "Home" +msgstr "Beranda" -#: templates/log_viewer/logfile_viewer.html:41 +#: templates/log_viewer/logfile_viewer.html:37 msgid "Download all Log Files" msgstr "Unduh seluruh File Log" -#: templates/log_viewer/logfile_viewer.html:42 +#: templates/log_viewer/logfile_viewer.html:38 msgid "Download this Log File" msgstr "Unduh File Log ini" -#: templates/log_viewer/logfile_viewer.html:48 +#: templates/log_viewer/logfile_viewer.html:44 msgid "No." msgstr "No." -#: templates/log_viewer/logfile_viewer.html:49 +#: templates/log_viewer/logfile_viewer.html:45 msgid "Log entries" msgstr "Entri log" -#: templates/log_viewer/logfile_viewer.html:53 +#: templates/log_viewer/logfile_viewer.html:49 msgid "No entries!" msgstr "Tidak ada entri!" + +#: templates/log_viewer/logfile_viewer.html:55 +msgid "Log Files" +msgstr "File log" diff --git a/log_viewer/settings.py b/log_viewer/settings.py index a8a4f17..68235e5 100644 --- a/log_viewer/settings.py +++ b/log_viewer/settings.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -import os - from django.conf import settings LOG_VIEWER_FILES = getattr(settings, 'LOG_VIEWER_FILES', []) @@ -12,5 +10,5 @@ LOG_VIEWER_MAX_READ_LINES = getattr(settings, 'LOG_VIEWER_MAX_READ_LINES', 1000) LOG_VIEWER_FILE_LIST_TITLE = getattr(settings, 'LOG_VIEWER_FILE_LIST_TITLE', None) LOG_VIEWER_FILE_LIST_STYLES = getattr(settings, 'LOG_VIEWER_FILE_LIST_STYLES', None) -LOG_VIEWER_PATTERNS = getattr(settings, 'LOG_VIEWER_PATTERNS', [']OFNI[', ']GUBED[', ']GNINRAW[', - ']RORRE[', ']LACITIRC[']) +LOG_VIEWER_PATTERNS = getattr(settings, 'LOG_VIEWER_PATTERNS', ['[INFO]', '[DEBUG]', '[WARNING]', + '[ERROR]', '[CRITICAL]']) diff --git a/log_viewer/templates/log_viewer/logfile_viewer.html b/log_viewer/templates/log_viewer/logfile_viewer.html index e420537..008916d 100644 --- a/log_viewer/templates/log_viewer/logfile_viewer.html +++ b/log_viewer/templates/log_viewer/logfile_viewer.html @@ -1,5 +1,6 @@ {% extends "admin/base_site.html" %} {% load static i18n %} +{% block title %}{% trans "Django Log Viewer" %} - {{ block.super }}{% endblock %} {% block breadcrumbs %}