Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add django 2.2 support #40

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@ install:
- pip install tox

script: tox

after_success:
- coveralls

deploy:
provider: pypi
user: Praekelt
password:
# NOTE: See http://docs.travis-ci.com/user/encryption-keys/ for more info.
secure: "insert encrypted pypi password here"
on:
tags: true
all_branches: true
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Mote - the pattern library framework
====================================

.. figure:: https://travis-ci.org/praekelt/mote.svg?branch=develop
.. figure:: https://travis-ci.org/praekeltfoundation/mote.svg?branch=develop
:align: center
:alt: Travis

Expand Down
2 changes: 1 addition & 1 deletion mote/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import threading


__version__ = "0.3.1"
__version__ = "0.0.1"
default_app_config = "mote.apps.MoteConfig"
PROJECT_PATHS = {}
_thread_locals = threading.local()
9 changes: 9 additions & 0 deletions mote/tests/requirements/225.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
django>=2.2.5,<3.0
beautifulsoup4==4.4.1
djangorestframework==3.10.3
six==1.9.0
djangorestframework-jwt==1.8.0
xmltodict==0.10.2
PyYAML==3.12
yamlordereddictloader==0.4.0
pypandoc==1.3.3
68 changes: 68 additions & 0 deletions mote/tests/settings/225.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import os
import glob
from os.path import expanduser

if "VIRTUAL_ENV" in os.environ:
BASE_DIR = os.path.join(
glob.glob(os.environ["VIRTUAL_ENV"] + "/lib/*/site-packages")[0],
"mote"
)
else:
BASE_DIR = os.path.dirname(os.path.dirname(__file__))

SECRET_KEY = "SECRET_KEY_PLACEHOLDER"

DEBUG = True

TEMPLATE_DEBUG = True

INSTALLED_APPS = (
"mote",
"mote.tests",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.staticfiles",
"rest_framework",
)

TEMPLATE_CONTEXT_PROCESSORS = [
"django.contrib.auth.context_processors.auth",
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media",
"django.template.context_processors.static",
"django.template.context_processors.tz",
"django.template.context_processors.request",
"django.contrib.messages.context_processors.messages",
]

TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": False,
"OPTIONS": {
"context_processors": TEMPLATE_CONTEXT_PROCESSORS,
"loaders": [
"django.template.loaders.filesystem.Loader",
"mote.loaders.app_directories.Loader",
"django.template.loaders.app_directories.Loader",
]
},
},
]

ROOT_URLCONF = "mote.tests.urls"

DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
}
}

USE_TZ = True

STATIC_URL = "/static/"

MOTE = {"project": lambda request: "myproject"}
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ def get_version(fname):


setup(
name="mote-prk",
name="mote-praekelt",
version=get_version('mote/__init__.py'),
description="Mote - the pattern library framework.",
long_description = open("README.rst", "r").read() + open("AUTHORS.rst", "r").read() + open("CHANGELOG.rst", "r").read(),
author="Praekelt Consulting",
author_email="dev@praekelt.com",
long_description=open("README.rst", "r").read() + open("AUTHORS.rst", "r").read() + open("CHANGELOG.rst", "r").read(),
author="Praekelt Foundation",
author_email="dev@praekelt.org",
url="https://github.com/praekelt/mote",
license="BSD",
packages=find_packages(),
Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
envlist =
django111-{py27,py35}
django20-py35
django225-py36

[testenv]
basepython = python2.7
Expand All @@ -19,3 +20,8 @@ commands = python manage.py test mote{posargs} --settings=mote.tests.settings.11
basepython = python3.5
deps = -rmote/tests/requirements/20.txt
commands = python manage.py test mote{posargs} --settings=mote.tests.settings.20

[testenv:django225-py36]
basepython = python3.6
deps = -rmote/tests/requirements/225.txt
commands = python manage.py test mote{posargs} --settings=mote.tests.settings.225