Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*
!Dockerfile
!setup.py
!setup.cfg
!pyproject.toml
!README.rst
!MANIFEST.in
!LICENSE
!src/
!src/**
!example/
!example/**
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include setup.py README.rst MANIFEST.in LICENSE AUTHORS
exclude tox.ini *.yml *.yaml Makefile Dockerfile .editorconfig flake.nix flake.lock
exclude tox.ini *.yml *.yaml Makefile Dockerfile .editorconfig flake.nix flake.lock .dockerignore

recursive-include src/bananas/templates *
recursive-include src/bananas/static *
Expand Down
12 changes: 5 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ with the ``drf`` extra to keep those in sync:

Currently tested only for

- Django 3.2 under Python 3.8-3.10
- Django 4.0 under Python 3.8-3.10
- Django 4.1 under Python 3.8-3.13
- Django 4.2 under Python 3.8-3.13
- Django 4.2 under Python 3.8-3.12
- Django 5.0 under Python 3.10-3.13
- Django 5.1 under Python 3.10-3.13
- Django 5.2 under Python 3.10-3.13
- Django 5.2 under Python 3.10-3.14
- Django 6.0 under Python 3.12-3.14

Pull requests welcome!

Expand Down Expand Up @@ -529,12 +527,12 @@ Testing and development requirements can be installed using package extras
``drf`` extra when installing ``dev``.

To get started, setup a virtualenv and then install test requirements and run
tests and checks on Python 3.9/Django 3.1 with:
tests and typehints on Python 3.14/Django 6.0 with:

.. code-block:: bash

python3 -m pip install -e .[test]
TOXENV=py39-django31,checks python3 -m tox
TOXENV=py314-django60,type-check python3 -m tox

You can install development requirements into your virtualenv. Linting and
formatting uses pre-commit which you could also install on a system level.
Expand Down
32 changes: 6 additions & 26 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,36 @@
version: "3.3"

services:
django1:
django52:
build:
context: .
args:
DJANGO: ">=1.11.16,<2"
DJANGO: ">=5.2,<5.3"
command: ["runserver", "0.0.0.0:8000"]
stdin_open: true
tty: true
ports:
- "8000:8000"
- "8005:8000"
volumes:
- .:/usr/src/django-bananas
- ./example:/app
environment:
PYTHONUNBUFFERED: "1"
PYTHONDONTWRITEBYTECODE: "True"

django2:
django60:
build:
context: .
args:
DJANGO: ">=2.0.9,<2.3"
DJANGO: ">=6.0,<6.1"
command: ["runserver", "0.0.0.0:8000"]
stdin_open: true
tty: true
ports:
- "8002:8000"
- "8006:8000"
volumes:
- .:/usr/src/django-bananas
- ./example:/app
environment:
PYTHONUNBUFFERED: "1"
PYTHONDONTWRITEBYTECODE: "True"
DJANGO_LANGUAGE_CODE: "sv-se"

django3:
build:
context: .
args:
DJANGO: "<3.1"
REQUIREMENTS: "requirements_django3.txt"
command: ["runserver", "0.0.0.0:8000"]
stdin_open: true
tty: true
ports:
- "8003:8000"
volumes:
- .:/usr/src/django-bananas
- ./example:/app
environment:
PYTHONUNBUFFERED: "1"
PYTHONDONTWRITEBYTECODE: "True"
DJANGO_LANGUAGE_CODE: "sv-se"
6 changes: 3 additions & 3 deletions example/example/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
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 include, url
from django.urls import include, path

from bananas import admin
from bananas.admin import api
Expand All @@ -27,6 +27,6 @@
api.register(UserViewSet)

urlpatterns = [
url(r'^api/', include('bananas.admin.api.urls')),
url(r'^', admin.site.urls),
path('api/', include('bananas.admin.api.urls')),
path('', admin.site.urls),
]
6 changes: 3 additions & 3 deletions example/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-r requirements_base.txt

django-cors-headers>=2.4.0,<3
djangorestframework>=3.10.0,<3.13
drf-yasg>=1.20.0,<1.21
django-cors-headers>=4.0,<5
djangorestframework>=3.15,<3.16
drf-yasg>=1.21.7,<1.22