Merge pull request #184 from grantmcconnaughey/new_python_django_versions

Test against Django 2/3, Python 3.7/3.8
This commit is contained in:
Grant McConnaughey 2020-01-04 11:10:38 -06:00 committed by GitHub
commit 5c4f587e6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 26 deletions

View file

@ -4,6 +4,8 @@ python:
- 3.4
- 3.5
- 3.6
- 3.7
- 3.8
before_install:
- pip install coveralls
install:
@ -12,17 +14,34 @@ install:
- pip install Django==${DJANGO}
script: make test
env:
- DJANGO=1.9.13
- DJANGO=1.10.7
- DJANGO=1.11.8
- DJANGO=2.0
- DJANGO=1.11.27
- DJANGO=2.0.13
- DJANGO=2.1.15
- DJANGO=2.2.9
- DJANGO=3.0.2
matrix:
exclude:
- python: 3.6
env: DJANGO=1.9.13
- python: 3.6
env: DJANGO=1.10.7
- python: 3.8
env: DJANGO=1.11.27
- python: 2.7
env: DJANGO=2.0
env: DJANGO=2.0.13
- python: 3.8
env: DJANGO=2.0.13
- python: 2.7
env: DJANGO=2.1.15
- python: 3.4
env: DJANGO=2.1.15
- python: 3.8
env: DJANGO=2.1.15
- python: 2.7
env: DJANGO=2.2.9
- python: 3.4
env: DJANGO=2.2.9
- python: 2.7
env: DJANGO=3.0.2
- python: 3.4
env: DJANGO=3.0.2
- python: 3.5
env: DJANGO=3.0.2
after_success:
- coveralls

View file

@ -1,6 +1,11 @@
Changelog
=========
* 5.0.0 (Unreleased)
* Added Django 2.1, 2.2, and 3.0 support.
* Added Python 3.7 and 3.8 support.
* Removed Python 1.9 and 1.10 support.
* 4.1.0 (December 20, 2017)
* Added Django 2.0 support.
* Added ``avatar_deleted`` signal.

View file

@ -18,10 +18,6 @@ django-avatar
:target: https://coveralls.io/github/grantmcconnaughey/django-avatar?branch=master
:alt: Coverage
.. image:: https://lintly.com/gh/grantmcconnaughey/django-avatar/badge.svg
:target: https://lintly.com/gh/grantmcconnaughey/django-avatar/
:alt: Lintly
Django-avatar is a reusable application for handling user avatars. It has the
ability to default to Gravatar if no avatar is found for a certain user.
Django-avatar automatically generates thumbnails and stores them to your default

View file

@ -18,6 +18,7 @@ def find_version(*file_paths):
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
setup(
name='django-avatar',
version=find_version("avatar", "__init__.py"),
@ -29,9 +30,11 @@ setup(
'Framework :: Django',
'Intended Audience :: Developers',
'Framework :: Django',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
@ -41,6 +44,8 @@ setup(
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
keywords='avatar, django',
author='Eric Florenzano',

View file

@ -12,6 +12,8 @@ DATABASES = {
}
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.contenttypes',
@ -19,16 +21,6 @@ INSTALLED_APPS = [
'avatar',
]
# Django 1.9
MIDDLEWARE_CLASSES = (
"django.middleware.common.CommonMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
)
# Django 1.10+
MIDDLEWARE = (
"django.middleware.common.CommonMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
@ -43,7 +35,13 @@ TEMPLATES = [
'APP_DIRS': True,
'DIRS': [
os.path.join(SETTINGS_DIR, 'templates')
]
],
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages'
]
}
}
]