Repository: maykinmedia/django-timeline-logger (language: python)

Issue:
cannot access '/timeline' url
The app is working, entries get logged to database but http://localhost:8000/timeline, as described in docs keeps giving me 404. I've tried http://localhost:8000/<myappname>/timeline and http://localhost:8000/admin/timeline but still nothing. Thoughts?


Discussion / hints:
Did you include the urls in your main urlconfig?

```python
urlpattersn = [
    ...
    url(r'^timeine/', include('timeline_logger.urls),
    ...
]
```

Can you point me at the part of the documentation that mentions this url, this may be a documentation issue :)
@sergei-maertens Indeed, the urlpatterns snippet is missing: [docs/usage.rst#L68](https://github.com/maykinmedia/django-timeline-logger/blob/develop/docs/usage.rst#L68)
You mean path instead of url, right? All my other patterns begin with path.
But no, that doesn't fix my issue, still 404.
Entirely possible it's just some step missing from the docs.
Shoot, noticed a typo. Working now, thanks.

Fix patch:
diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml
index 51ef9c1..f9204e2 100644
--- a/.github/workflows/code_quality.yml
+++ b/.github/workflows/code_quality.yml
@@ -8,10 +8,10 @@ on:
       - develop
     tags:
     paths:
-      - '**.py'
+      - "**.py"
   pull_request:
     paths:
-      - '**.py'
+      - "**.py"
   workflow_dispatch:
 
 jobs:
@@ -20,12 +20,12 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        toxenv: [isort, black]
+        toxenv: [isort, black, docs]
     steps:
       - uses: actions/checkout@v2
       - uses: actions/setup-python@v2
         with:
-          python-version: '3.7'
+          python-version: "3.11"
       - name: Install dependencies
         run: pip install tox
       - run: tox
diff --git a/README.rst b/README.rst
index 1f4de9f..860dce7 100644
--- a/README.rst
+++ b/README.rst
@@ -11,7 +11,7 @@ A reusable Django app to log actions and display them in a timeline
 Prerequisites
 =============
 
-This project uses ``django.contrib.postgres.JSONField``, and as such, you need:
+This project uses ``django.db.models.JSONField``, and as such, you need:
 
 * at least Django 3.2+
 * a database supporting ``django.db.models.JSONField``
diff --git a/demo/demo/urls.py b/demo/demo/urls.py
index e6bad02..56b763f 100644
--- a/demo/demo/urls.py
+++ b/demo/demo/urls.py
@@ -1,21 +1,7 @@
-"""demo URL Configuration
-
-The `urlpatterns` list routes URLs to views. For more information please see:
-    https://docs.djangoproject.com/en/1.11/topics/http/urls/
-Examples:
-Function views
-    1. Add an import:  from my_app import views
-    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
-Class-based views
-    1. Add an import:  from other_app.views import Home
-    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
-Including another URLconf
-    1. Import the include() function: from django.conf.urls import url, include
-    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
-"""
-from django.conf.urls import url
 from django.contrib import admin
+from django.urls import include, path
 
 urlpatterns = [
-    url(r"^admin/", admin.site.urls),
+    path("admin/", admin.site.urls),
+    path("timeline/", include("timeline_logger.urls")),
 ]
diff --git a/docs/changelog.rst b/docs/changelog.rst
index dc51479..f4c0bae 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -2,6 +2,16 @@
 Changelog
 =========
 
+3.0.0 (2023-07-11)
+==================
+
+No changes in functionality or public API, just our supported versions of Python/Django.
+
+* Dropped Python < 3.8 support
+* Confirmed support for Python 3.11
+* Dropped support for end-of-life Django 2.x, 4.0.x
+* Confirmed support for Django 4.2
+
 2.1.0 (2022-04-13)
 ==================
 
diff --git a/docs/conf.py b/docs/conf.py
index fd70a8c..3145c4d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -70,7 +70,7 @@
 #
 # This is also used if you do content translation via gettext catalogs.
 # Usually you set "language" from the command line for these cases.
-language = None
+# language = None
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:
diff --git a/docs/index.rst b/docs/index.rst
index 0a3ef39..9e1b055 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -9,14 +9,9 @@ Django Timeline Logger's documentation
 
 .. rubric:: A reusable Django app to log actions and display them in a timeline.
 
-.. image:: https://travis-ci.org/maykinmedia/django-timeline-logger.png
-    :target: https://travis-ci.org/maykinmedia/django-timeline-logger
+|build-status| |code-quality| |coverage| |black|
 
-.. image:: https://codecov.io/gh/maykinmedia/django-timeline-logger/branch/develop/graph/badge.svg
-    :target: https://codecov.io/gh/maykinmedia/django-timeline-logger
-
-.. image:: https://badge.fury.io/py/django-timeline-logger.svg
-    :target: https://badge.fury.io/py/django-timeline-logger
+|python-versions| |django-versions| |pypi-version|
 
 
 Overview
@@ -33,13 +28,11 @@ customizable than the builtin "admin logs" generated via ``LogEntry``.
 Requirements
 ============
 
-Django Timeline Logger makes use of Django's ``contrib.postgres.JSONField``,
+Django Timeline Logger makes use of Django's ``django.db.models.JSONField``,
 then your backend will need:
 
-   - At least Django-1.11_.
-   - At least PostgreSQL-9.4_.
-   - At least psycopg2-2.5.4_.
-
+   - One of the maintained Django_ versions
+   - A database backend with support for the JSONField_ for your Django version
 
 Contents
 ========
@@ -78,8 +71,29 @@ Indices and tables
 * :ref:`search`
 
 
-.. _Django-1.11: https://docs.djangoproject.com/en/1.11/releases/1.11/
-.. _PostgreSQL-9.4: https://www.postgresql.org/docs/9.4/static/release-9-4.html
-.. _psycopg2-2.5.4: https://pypi.python.org/pypi/psycopg2/2.5.4
+.. _Django: https://www.djangoproject.com/download/
+.. _JSONField: https://docs.djangoproject.com/en/dev/ref/models/fields/#jsonfield
 .. _MIT License: https://opensource.org/licenses/MIT
 .. _Github: https://github.com/maykinmedia/django-timeline-logger
+
+.. |build-status| image:: https://github.com/maykinmedia/django-timeline-logger/actions/workflows/ci.yml/badge.svg
+    :alt: Build status
+    :target: https://github.com/maykinmedia/django-timeline-logger/actions/workflows/ci.yml
+
+.. |code-quality| image:: https://github.com/maykinmedia/django-timeline-logger/actions//workflows/code_quality.yml/badge.svg
+    :alt: Code quality checks
+    :target: https://github.com/maykinmedia/django-timeline-logger/actions//workflows/code_quality.yml
+
+.. |coverage| image:: https://codecov.io/gh/maykinmedia/django-timeline-logger/branch/master/graph/badge.svg
+    :target: https://codecov.io/gh/maykinmedia/django-timeline-logger
+    :alt: Coverage status
+
+.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
+    :target: https://github.com/psf/black
+
+.. |python-versions| image:: https://img.shields.io/pypi/pyversions/django-timeline-logger.svg
+
+.. |django-versions| image:: https://img.shields.io/pypi/djversions/django-timeline-logger.svg
+
+.. |pypi-version| image:: https://img.shields.io/pypi/v/django-timeline-logger.svg
+    :target: https://pypi.org/project/django-timeline-logger/
diff --git a/docs/installation.rst b/docs/installation.rst
index 3bb7e84..915c921 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -28,5 +28,17 @@ Then, run the migrations:
 
    python manage.py migrate timeline_logger
 
+and configure your `urls.py` as you desire, e.g.
+
+.. code-block:: python
+
+    from django.contrib import admin
+    from django.urls import include, path
+
+    urlpatterns = [
+        path("admin/", admin.site.urls),
+        path("timeline/", include("timeline_logger.urls")),
+    ]
+
 You can now start using the application. Go to :ref:`usage` section for the
 details.
diff --git a/docs/settings.rst b/docs/settings.rst
index 88eea0a..0c9c7d4 100644
--- a/docs/settings.rst
+++ b/docs/settings.rst
@@ -4,7 +4,7 @@
 Settings
 ========
 
-Timeline Logger default behaviour can also be customized by using the next
+Timeline Logger default behaviour can also be customized by using the following
 application settings in your project:
 
    - ``TIMELINE_DEFAULT_TEMPLATE``: defines the Django template used for the
diff --git a/docs/usage.rst b/docs/usage.rst
index baf1fba..e328ac5 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -17,9 +17,9 @@ Given those details, it's pretty clear how it works: whenever you want to log
 an event in your system, you create a ``TimelineLog`` for it, passing the data
 you consider useful in the context and using a template to render the message.
 
-The context is stored in a ``django.contrib.postgres.JSONField``, which basically
-accepts a Python dictionary representing JSON data, to be built by you with the
-data you want to pass to the message template.
+The context is stored in a ``django.db.models.JSONField``, which accepts a
+Python dictionary representing JSON data, to be built by you with the data you
+want to pass to the message template.
 
 
 Default example
diff --git a/timeline_logger/conf.py b/timeline_logger/conf.py
index 7bc6233..ecf0be7 100644
--- a/timeline_logger/conf.py
+++ b/timeline_logger/conf.py
@@ -7,7 +7,6 @@
 
 
 class TimelineLoggerConf(AppConf):
-
     DEFAULT_TEMPLATE = "timeline_logger/default.txt"
 
     PAGINATE_BY = 25
diff --git a/timeline_logger/migrations/0001_initial.py b/timeline_logger/migrations/0001_initial.py
index 79ff247..11c6bb2 100644
--- a/timeline_logger/migrations/0001_initial.py
+++ b/timeline_logger/migrations/0001_initial.py
@@ -9,7 +9,6 @@
 
 
 class Migration(migrations.Migration):
-
     initial = True
 
     dependencies = [
diff --git a/timeline_logger/migrations/0002_auto_20160624_1045.py b/timeline_logger/migrations/0002_auto_20160624_1045.py
index d7f2c79..071bfa7 100644
--- a/timeline_logger/migrations/0002_auto_20160624_1045.py
+++ b/timeline_logger/migrations/0002_auto_20160624_1045.py
@@ -6,7 +6,6 @@
 
 
 class Migration(migrations.Migration):
-
     dependencies = [
         ("timeline_logger", "0001_initial"),
     ]
diff --git a/timeline_logger/migrations/0003_auto_20171025_1414.py b/timeline_logger/migrations/0003_auto_20171025_1414.py
index f5f7230..ae5f7d3 100644
--- a/timeline_logger/migrations/0003_auto_20171025_1414.py
+++ b/timeline_logger/migrations/0003_auto_20171025_1414.py
@@ -8,7 +8,6 @@
 
 
 class Migration(migrations.Migration):
-
     dependencies = [
         ("timeline_logger", "0002_auto_20160624_1045"),
     ]
diff --git a/timeline_logger/migrations/0004_alter_fields.py b/timeline_logger/migrations/0004_alter_fields.py
index 9af091f..9d78858 100644
--- a/timeline_logger/migrations/0004_alter_fields.py
+++ b/timeline_logger/migrations/0004_alter_fields.py
@@ -9,7 +9,6 @@
 
 
 class Migration(migrations.Migration):
-
     dependencies = [
         ("timeline_logger", "0003_auto_20171025_1414"),
     ]
diff --git a/timeline_logger/migrations/0005_auto_20220413_0742.py b/timeline_logger/migrations/0005_auto_20220413_0742.py
index de37bc3..a66b310 100644
--- a/timeline_logger/migrations/0005_auto_20220413_0742.py
+++ b/timeline_logger/migrations/0005_auto_20220413_0742.py
@@ -5,7 +5,6 @@
 
 
 class Migration(migrations.Migration):
-
     dependencies = [
         ("timeline_logger", "0004_alter_fields"),
     ]
diff --git a/timeline_logger/migrations/0006_auto_20220413_0749.py b/timeline_logger/migrations/0006_auto_20220413_0749.py
index 43b4213..3aa4e8b 100644
--- a/timeline_logger/migrations/0006_auto_20220413_0749.py
+++ b/timeline_logger/migrations/0006_auto_20220413_0749.py
@@ -4,7 +4,6 @@
 
 
 class Migration(migrations.Migration):
-
     dependencies = [
         ("timeline_logger", "0005_auto_20220413_0742"),
     ]
diff --git a/tox.ini b/tox.ini
index b3fa01d..f59b816 100644
--- a/tox.ini
+++ b/tox.ini
@@ -49,9 +49,10 @@ commands = black --check timeline_logger docs tests setup.py
 basepython=python
 changedir=docs
 skipsdist=true
-extras = docs
+extras =
+    tests
+    docs
 commands=
     py.test check_sphinx.py -v \
-    --junitxml=../reports/junit-{envname}.xml \
-    --tb=line \
+    --tb=auto \
     {posargs}


Test patch:
diff --git a/tests/factories.py b/tests/factories.py
index 0477923..c4704eb 100644
--- a/tests/factories.py
+++ b/tests/factories.py
@@ -2,7 +2,6 @@
 
 
 class UserFactory(factory.django.DjangoModelFactory):
-
     first_name = "Test"
     last_name = "User"
     username = factory.Sequence(lambda n: "user_{0}".format(n))