Skip to content

Commit

Permalink
Fixes Django 1.10 url pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Feb 2, 2016
1 parent f809e0c commit c358e2b
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 3,116 deletions.
20 changes: 8 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,23 @@ cache:
- pip
python:
- "2.7"
- "3.3"
- "3.4"
- "pypy"
- "pypy3"
- "3.5"
env:
global:
- DISPLAY=:99.0
matrix:
- DJANGO="<1.6,>=1.5"
- DJANGO="<1.7,>=1.6"
- DJANGO="<1.8,>=1.7"
- DJANGO="<1.9,>=1.8"

- DJANGO="Django<1.9,>=1.8"
- DJANGO="Django<1.10,>=1.9"
- DJANGO="-e git+https://github.com/django/django.git@master#egg=Django"
matrix:
fast_finish: true
allow_failures:
- env: DJANGO="<1.6,>=1.5"
- env: DJANGO="<1.7,>=1.6"
- env: DJANGO="-e git+https://github.com/django/django.git@master#egg=Django"
install:
- pip install --upgrade pip
- pip install .
- pip install Django$DJANGO
- pip install $DJANGO
- pip install -U pytest pytest-django selenium
- pip install -U flake8 pep8-naming isort pep257
- pip install -U coveralls
Expand All @@ -33,6 +29,6 @@ script:
- isort --check-only --recursive --diff .
- flake8 --jobs=2 .
- pep257 s3file
- coverage run --source=s3file runtests.py
- coverage run --source=s3file -m 'pytest'
after_success:
- coveralls
3,085 changes: 0 additions & 3,085 deletions runtests.py

This file was deleted.

1 change: 0 additions & 1 deletion s3file/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


class S3FileInput(ClearableFileInput):

"""FileInput that uses JavaScript to directly upload to Amazon S3."""

needs_multipart_form = False
Expand Down
7 changes: 3 additions & 4 deletions s3file/urls.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from __future__ import absolute_import, unicode_literals

from django.conf.urls import patterns, url
from django.conf.urls import url

from .views import S3FileView

urlpatterns = patterns(
'',
urlpatterns = [
url('^s3file/sign',
S3FileView.as_view(), name='s3file-sign'),
)
]
2 changes: 0 additions & 2 deletions s3file/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@


class S3FileViewMixin(object):

"""
Mixin to handle file upload signing for S3 buckets.
Expand Down Expand Up @@ -109,7 +108,6 @@ def sign(self):


class S3FileView(S3FileViewMixin, View):

"""View to sign upload requests to an S3 bucket."""

def post(self, request, *args, **kwargs):
Expand Down
7 changes: 3 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ statistics = true
show-source = true

[pep257]
ignore = D100,D102,D103
explain = true
count = true
add-ignore = D100,D102,D103,D104

[isort]
atomic = true
multi_line_output = 5
line_length = 79
skip = manage.py
known_first_party = s3file
known_first_party = s3file,tests
known_third_party = django
combine_as_imports = true
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='django-s3file',
version='1.1.0',
version='1.2.0',
description='A lightweight Fine Uploader input for Django and Amazon S3',
author='codingjoe',
url='https://github.com/codingjoe/django-s3file',
Expand Down
9 changes: 6 additions & 3 deletions tests/testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@
MEDIA_URL = '/s3/'
SITE_ID = 1

TEMPLATE_DIRS = (
os.path.join(BASE_DIR, "templates"),
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
},
]

USE_L10N = True

Expand Down
7 changes: 3 additions & 4 deletions tests/testapp/urls.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# -*- coding:utf-8 -*-
from __future__ import absolute_import, unicode_literals

from django.conf.urls import include, patterns, url
from django.conf.urls import include, url
from django.views.generic import FormView

from . import forms, views

urlpatterns = patterns(
'',
urlpatterns = [
url(r'^s3file/', include('s3file.urls')),
url(r'^s3/$',
views.S3MockView.as_view(), name='s3mock'),
Expand All @@ -17,4 +16,4 @@
template_name='form.html',
success_url='/upload/'
), name='upload'),
)
]

0 comments on commit c358e2b

Please sign in to comment.