Skip to content

Commit

Permalink
Merge branch 'master' into 1.1.0-release
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier authored Nov 20, 2024
2 parents d5680bf + 168acd8 commit d7fdbe4
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 20 deletions.
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: ["https://openwisp.org/sponsorship/"]
32 changes: 32 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Python Package to Pypi.org

on:
release:
types: [published]

permissions:
id-token: write

jobs:
pypi-publish:
name: Release Python Package on Pypi.org
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/openwisp-ipam
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install -U pip
pip install build
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Notification Cache
In a typical OpenWISP installation, ``actor``, ``action_object`` and
``target`` objects are same for a number of notifications. To optimize
database queries, these objects are cached using `Django's cache framework
<https://docs.djangoproject.com/en/3.0/topics/cache/>`_. The cached values
<https://docs.djangoproject.com/en/4.2/topics/cache/>`_. The cached values
are updated automatically to reflect actual data from database. You can
control the duration of caching these objects using
:ref:`OPENWISP_NOTIFICATIONS_CACHE_TIMEOUT setting
Expand Down
26 changes: 16 additions & 10 deletions docs/developer/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ to the `models of the sample app in the test project

You can add fields in a similar way in your ``models.py`` file.

**Note**: For doubts regarding how to use, extend or develop models please
refer to the `"Models" section in the django documentation
<https://docs.djangoproject.com/en/4.2/topics/db/models/>`_.
.. note::

If you have questions about using, extending, or developing models,
refer to the `"Models" section of the Django documentation
<https://docs.djangoproject.com/en/4.2/topics/db/models/>`_.

8. Add swapper configurations
-----------------------------
Expand Down Expand Up @@ -191,10 +193,12 @@ Refer to the `admin.py file of the sample app
To introduce changes to the admin, you can do it in two main ways which
are described below.

**Note**: For more information regarding how the django admin works, or
how it can be customized, please refer to `"The django admin site" section
in the django documentation
<https://docs.djangoproject.com/en/4.2/ref/contrib/admin/>`_.
.. note::

For more information regarding how the django admin works, or how it
can be customized, please refer to `"The django admin site" section in
the django documentation
<https://docs.djangoproject.com/en/4.2/ref/contrib/admin/>`_.

1. Monkey patching
~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -320,9 +324,11 @@ See the `tests of the sample_notifications
<https://github.com/openwisp/openwisp-notifications/blob/master/tests/openwisp2/sample_notifications/tests.py>`_
to find out how to do this.

**Note**: Some tests will fail if ``templatetags`` and ``admin/base.html``
are not configured properly. See preceding sections to configure them
properly.
.. note::

Some tests will fail if ``templatetags`` and ``admin/base.html`` are
not configured properly. See preceding sections to configure them
properly.

Other base classes that can be inherited and extended
-----------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions docs/developer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ Developer Docs

./installation.rst
./utils.rst
./cache.rst
./extending.rst

Other useful resources:

- :doc:`../user/rest-api`
- :doc:`../user/settings`
- :doc:`../user/rest-api`
- :doc:`../user/settings`
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ within the OpenWISP architecture.
./user/scheduled-deletion-of-notifications.rst
./user/rest-api.rst
./user/settings.rst
./user/notification-cache.rst
./user/management-commands.rst

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion docs/user/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Configure Django's settings as follows:
CSRF_COOKIE_DOMAIN = "example.com"
Please refer to `Django's settings documentation
<https://docs.djangoproject.com/en/3.0/ref/settings/>`_ for more
<https://docs.djangoproject.com/en/4.2/ref/settings/>`_ for more
information on ``SESSION_COOKIE_DOMAIN`` and ``CSRF_COOKIE_DOMAIN``
settings.

Expand Down
6 changes: 3 additions & 3 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openwisp-utils[qa,selenium] @ https://github.com/openwisp/openwisp-utils/tarball/master
openwisp-utils[qa,selenium]~=1.1.0
django-cors-headers~=4.4.0
django-redis~=5.4.0
channels_redis~=4.2.0
pytest-asyncio~=0.23.8
pytest-django~=4.8.0
pytest-asyncio~=0.24.0
pytest-django~=4.9.0
freezegun~=1.5.1
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
django-notifications-hq~=1.8.3
channels~=3.0.2
openwisp-users @ https://github.com/openwisp/openwisp-users/tarball/master
openwisp-utils[rest,celery] @ https://github.com/openwisp/openwisp-utils/tarball/master
markdown~=3.6.0
openwisp-utils[rest,celery]~=1.1.0
markdown~=3.7.0
1 change: 1 addition & 0 deletions tests/openwisp2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'allauth.account.middleware.AccountMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
Expand Down

0 comments on commit d7fdbe4

Please sign in to comment.