Skip to content

Commit d2ae65b

Browse files
authored
Merge pull request #151 from caktus/prepare-1-0-release
Prepare 1.0 release
2 parents 21218e8 + d8d1d74 commit d2ae65b

32 files changed

+115
-268
lines changed

.travis.yml

+8-48
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,22 @@ language: python
22

33
sudo: false
44

5-
# Ubuntu trusty (14.04) - latest that Travis offers
6-
dist: trusty
7-
8-
# Make sure all the python versions we need are pre-installed
9-
# (apt-get is not available in the container-based build system)
10-
addons:
11-
apt:
12-
sources:
13-
- deadsnakes
14-
packages:
15-
- python2.7
16-
- python3.4
17-
- python3.5
18-
- python3.6
19-
20-
# The version of Python that'll be used to invoke tox. Has no effect
21-
# on what version of Python tox uses to run each set of tests.
225
python:
6+
- "3.4"
7+
- "3.5"
238
- "3.6"
9+
- "3.7"
2410

25-
env:
26-
- TOXENV=py27-1.8.X
27-
- TOXENV=py34-1.8.X
28-
- TOXENV=py35-1.8.X
29-
30-
- TOXENV=py27-1.10.X
31-
- TOXENV=py34-1.10.X
32-
- TOXENV=py35-1.10.X
33-
34-
- TOXENV=py27-1.11.X
35-
- TOXENV=py34-1.11.X
36-
- TOXENV=py35-1.11.X
37-
- TOXENV=py36-1.11.X
38-
39-
- TOXENV=py34-2.0.X
40-
- TOXENV=py35-2.0.X
41-
- TOXENV=py36-2.0.X
42-
43-
- TOXENV=py35-2.1.X
44-
- TOXENV=py36-2.1.X
45-
46-
- TOXENV=coverage
47-
- TOXENV=docs
48-
- TOXENV=qunit
49-
50-
before_install:
51-
- "export DISPLAY=:99.0"
52-
- "sh -e /etc/init.d/xvfb start"
53-
- sleep 3
11+
services:
12+
- xvfb
5413

5514
install:
56-
- pip install tox coveralls
15+
- pip install pip -U
16+
- pip install tox-travis
17+
- pip install coveralls
5718

5819
script:
5920
- tox
6021

61-
6222
after_success:
6323
- coveralls

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ Nicolas Ippolito
1313
David Ray
1414
Yaroslav Klyuyev
1515
Ben Phillips
16+
Petr Dlouhý

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2012-2016, Caktus Consulting Group, LLC
1+
Copyright (c) 2012-2020, Caktus Consulting Group, LLC
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Features
2626
Installation
2727
--------------------------------------
2828

29-
django-scribbler requires Django 1.8, 1.10, 1.11, or 2.0, and Python 2.7 or >= 3.4.
29+
django-scribbler currently requires Django 2.0, 2.1 or 2.2 and Python >= 3.4. Older versions of
30+
django-scribbler may support older versions of Django and Python.
3031

3132
To install from PyPi::
3233

@@ -60,4 +61,3 @@ you can join the `Transifex project <https://www.transifex.com/projects/p/django
6061

6162
Development sponsored by `Caktus Consulting Group, LLC
6263
<http://www.caktusgroup.com/services>`_.
63-

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
# General information about the project.
4545
project = u'django-scribbler'
46-
copyright = u'2012-2016, Caktus Consulting Group'
46+
copyright = u'2012-2020, Caktus Consulting Group'
4747

4848
# The version info for the project you're documenting, acts as replacement for
4949
# |version| and |release|, also used in various other places throughout the

docs/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To test against multiple versions of Django you can use install and use ``tox>=1
6262
# Build all environments
6363
tox
6464
# Build a single environment
65-
tox -e py36-1.11.X
65+
tox -e py37-2.2.X
6666

6767
Building all environments will also build the documentation. More on that in the next
6868
section.

docs/releases.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ Release History
33

44
Release and change history for django-scribbler
55

6-
v0.9.0 (Release 2017-
6+
v1.0.0 (Release 2019-10-28)
7+
------------------------------------
8+
9+
- Add support for Django 2.0 through 2.2 (Thanks Petr Dlouhý)
10+
- Drop support for Django < 2
11+
- Drop support for Python 2
12+
13+
v0.9.0 (Release 2017-12-11)
714
------------------------------------
815

916
- Add support for Django 1.11 and Python 3.6

example/dayslog/migrations/0001_initial.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from __future__ import unicode_literals
3-
42
from django.db import models, migrations
53

64

example/example/settings.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@
9999
},
100100
]
101101

102-
MIDDLEWARE_CLASSES = (
103-
'django.middleware.common.CommonMiddleware',
102+
MIDDLEWARE = (
103+
'django.middleware.security.SecurityMiddleware',
104104
'django.contrib.sessions.middleware.SessionMiddleware',
105+
'django.middleware.common.CommonMiddleware',
105106
'django.middleware.csrf.CsrfViewMiddleware',
106107
'django.contrib.auth.middleware.AuthenticationMiddleware',
107108
'django.contrib.messages.middleware.MessageMiddleware',
108-
# Uncomment the next line for simple clickjacking protection:
109-
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
109+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
110110
)
111111

112112
ROOT_URLCONF = 'example.urls'

example/example/urls.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
from django.conf.urls import include, url
22

3-
# Uncomment the next two lines to enable the admin:
43
from django.contrib import admin
5-
from django.views.i18n import javascript_catalog
4+
from django.views.i18n import JavaScriptCatalog
65

76
from example.views import homepage
87
admin.autodiscover()
98

10-
js_info_dict = {
11-
'packages': ('scribbler', ),
12-
}
139

1410
urlpatterns = [
1511
# Examples:
@@ -20,8 +16,8 @@
2016
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
2117

2218
# Uncomment the next line to enable the admin:
23-
url(r'^admin/', include(admin.site.urls)),
19+
url(r'^admin/', admin.site.urls),
2420
url(r'^scribble/', include('scribbler.urls')),
25-
url(r'^jsi18n/$', javascript_catalog, js_info_dict, name='jsi18n'),
21+
url(r'^jsi18n/$', JavaScriptCatalog.as_view(packages=['scribbler']), name='jsi18n'),
2622
url(r'^$', homepage, name='home'),
2723
]

example/example/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def homepage(request):
2323
'form': form
2424
}
2525

26-
if request.user.is_authenticated():
26+
if request.user.is_authenticated:
2727
context['days_log'], created = DaysLog.objects.get_or_create(day=datetime.date.today())
2828

2929
return render(request, 'home.html', context)

example/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Django==1.11.7
2-
django-scribbler==0.9.0
1+
Django==2.2.6
2+
django-scribbler==1.0.0

example/templates/home.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
{% load scribbler_tags staticfiles %}
2+
{% load scribbler_tags static %}
33
<html lang="en" class="no-js">
44
<head>
55
<meta charset="utf-8">

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "django-scribbler",
3-
"version": "0.6.0",
3+
"version": "1.0.0",
44
"description": " An application for managing snippets of text for a Django website.",
55
"keywords": [],
66
"main": "scribbler/static/scribbler/js/scribbler.js",

runtests.py

+16-35
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,8 @@
44
from optparse import OptionParser
55

66
import django
7-
from django import VERSION as django_version
87
from django.conf import settings
9-
10-
MIDDLEWARES=(
11-
'django.middleware.common.CommonMiddleware',
12-
'django.contrib.sessions.middleware.SessionMiddleware',
13-
'django.middleware.csrf.CsrfViewMiddleware',
14-
'django.contrib.auth.middleware.AuthenticationMiddleware',
15-
'django.contrib.messages.middleware.MessageMiddleware',
16-
)
17-
18-
class DisableMigrations(object):
19-
def __contains__(self, item):
20-
return True
21-
22-
def __getitem__(self, item):
23-
return 'notmigrations'
24-
8+
from django.test.utils import get_runner
259

2610
if not settings.configured:
2711
settings.configure(
@@ -38,9 +22,15 @@ def __getitem__(self, item):
3822
'django.contrib.staticfiles',
3923
'scribbler',
4024
),
41-
MIDDLEWARE_CLASSES=MIDDLEWARES,
42-
MIDDLEWARE=MIDDLEWARES,
43-
SITE_ID=1,
25+
MIDDLEWARE=(
26+
'django.middleware.security.SecurityMiddleware',
27+
'django.contrib.sessions.middleware.SessionMiddleware',
28+
'django.middleware.common.CommonMiddleware',
29+
'django.middleware.csrf.CsrfViewMiddleware',
30+
'django.contrib.auth.middleware.AuthenticationMiddleware',
31+
'django.contrib.messages.middleware.MessageMiddleware',
32+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
33+
),
4434
SECRET_KEY='super-secret',
4535

4636
ROOT_URLCONF='scribbler.tests.urls',
@@ -74,12 +64,11 @@ def __getitem__(self, item):
7464
},
7565
],
7666
MIGRATION_MODULES={
77-
# these 'tests.migrations' modules don't actually exist, but this lets
78-
# us skip creating migrations for the test models.
79-
# https://docs.djangoproject.com/en/1.11/ref/settings/#migration-modules
80-
'scribbler': 'scribbler.tests.migrations' if django_version < (1, 9) else None,
81-
'dayslog': 'dayslog.tests.migrations' if django_version < (1, 9) else None,
82-
} if django_version >= (1, 9) else DisableMigrations(),
67+
# this lets us skip creating migrations for the test models.
68+
# https://docs.djangoproject.com/en/2.2/ref/settings/#migration-modules
69+
'scribbler': None,
70+
'dayslog': None,
71+
},
8372
MEDIA_ROOT='',
8473
MEDIA_URL='/media/',
8574
STATIC_ROOT='',
@@ -88,16 +77,8 @@ def __getitem__(self, item):
8877
)
8978

9079

91-
from django.test.utils import get_runner
92-
93-
9480
def runtests(*test_args, **kwargs):
95-
if django_version < (1, 11):
96-
# Try lots of ports until we find one we can use
97-
os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS'] = 'localhost:8099-9999'
98-
99-
if hasattr(django, 'setup'):
100-
django.setup()
81+
django.setup()
10182
if not test_args:
10283
test_args = ['scribbler', ]
10384
TestRunner = get_runner(settings)

scribbler/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"django-scribbler is an application for managing snippets of text for a Django website."
22

33

4-
__version__ = '0.9.0'
4+
__version__ = '1.0.0'
55

66

77
default_app_config = 'scribbler.apps.ScribblerAppConfig'

scribbler/conf.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"Default settings for django-scribbler."
2-
from __future__ import unicode_literals
3-
42
import hashlib
53

64
from django.conf import settings

0 commit comments

Comments
 (0)