diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc38077..f47dc5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,7 @@ jobs: - 3.6 - 3.7 - 3.8 + - 3.9 steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index ed2c605..ad17203 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ docs/_build .tox .coverage +coverage* # editor files .idea diff --git a/setup.py b/setup.py index be41880..869faf9 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -def get_version(rel_path): +def get_version(): return importlib.import_module('flag').__version__ @@ -20,7 +20,7 @@ def read(rel_path): setuptools.setup( name='django-flag-app', - version=get_version('flag/__init__.py'), + version=get_version(), author='Abhyudai', author_email='', description='A pluggable django application that adds the ability for users to flag(or report) your models', @@ -39,6 +39,7 @@ def read(rel_path): 'Framework :: Django :: 2.2', 'Framework :: Django :: 3.0', 'Framework :: Django :: 3.1', + 'Framework :: Django :: 3.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', @@ -46,11 +47,12 @@ def read(rel_path): 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], python_requires='>=3.6', install_requires=['django'], - keywords='django flag report', + keywords='django flag report moderate', zip_safe=False, ) diff --git a/testapp/settings.py b/testapp/settings.py index 6f9ae02..0031616 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -1,16 +1,8 @@ -""" -Generated by 'django-admin startproject' using Django 3.0.6. - -For more information on this file, see -https://docs.djangoproject.com/en/3.0/topics/settings/ +import os -For the full list of settings and their values, see -https://docs.djangoproject.com/en/3.0/ref/settings/ -""" +import django -import os -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.abspath(__file__)) @@ -134,6 +126,9 @@ LOGIN_REDIRECT_URL = '/' LOGOUT_REDIRECT_URL = LOGIN_URL +if django.VERSION >= (3, 2): + DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' + EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER', 'user@domain') DEFAULT_FROM_EMAIL = EMAIL_HOST_USER EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD', 'password') diff --git a/tox.ini b/tox.ini index edb3023..50bd513 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,16 @@ [tox] envlist = - py{36,37,38}-{dj21, dj22, dj30, dj31} - py{38}-{djmain} + py36-dj{21, 22, 30, 31, 32} + py37-dj{21, 22, 30, 31, 32} + py38-dj{21, 22, 30, 31, 32, main} + py39-dj{21, 22, 30, 31, 32, main} [gh-actions] python = 3.6: py36 3.7: py37 3.8: py38 + 3.9: py39 [testenv:docs] deps = @@ -21,13 +24,13 @@ deps = flake8 Pillow djangorestframework - coverage pytest-django pytest-cov dj21: Django>=2.1,<2.2 dj22: Django>=2.2,<2.3 dj30: Django>=3.0,<3.1 dj31: Django>=3.1,<3.2 + dj32: Django>=3.2,<3.3 djmain: https://github.com/django/django/archive/main.tar.gz usedevelop = True