Skip to content

Commit a911945

Browse files
committed
Merge pull request #18 from raiderrobert/develop
Bringing everything up to date for pypi
2 parents 75d169d + 5e59a0e commit a911945

File tree

6 files changed

+50
-27
lines changed

6 files changed

+50
-27
lines changed

.gitignore

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1-
*.pyc
1+
*.py[co]
2+
3+
# Packages
4+
*.egg
5+
*.egg-info
6+
dist
7+
build
8+
eggs
9+
parts
10+
bin
11+
var
12+
sdist
13+
develop-eggs
14+
.installed.cfg
15+
_build
16+
17+
# pycharm files
18+
.idea/
19+
20+
# Unit test / coverage reports
221
.coverage
3-
htmlcov
4-
dist/
5-
*.egg-info/
6-
.tox/
7-
.idea/
22+
.tox

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Include the license file
2+
include LICENSE.txt

multiurl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
from django.core import urlresolvers
44

5+
56
class ContinueResolving(Exception):
67
pass
78

9+
810
def multiurl(*urls, **kwargs):
911
exceptions = kwargs.get('catch', (ContinueResolving,))
1012
return MultiRegexURLResolver(urls, exceptions)
1113

14+
1215
class MultiRegexURLResolver(urlresolvers.RegexURLResolver):
1316
def __init__(self, urls, exceptions):
1417
super(MultiRegexURLResolver, self).__init__('', None)
@@ -40,6 +43,7 @@ def resolve(self, path):
4043
return MultiResolverMatch(matched, self._exceptions, patterns_matched, path)
4144
raise urlresolvers.Resolver404({'tried': tried, 'path': path})
4245

46+
4347
class MultiResolverMatch(object):
4448
def __init__(self, matches, exceptions, patterns_matched, path):
4549
self.matches = matches

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[metadata]
2+
description-file = README.rst
3+
4+
[bdist_wheel]
5+
universal=1

setup.py

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
1-
import os
2-
from setuptools import setup
3-
4-
def read(fname):
5-
return open(os.path.join(os.path.dirname(__file__), fname)).read()
1+
from setuptools import setup, find_packages
62

73
setup(
8-
name = 'django-multiurl',
9-
version = '1.1.0',
10-
description = 'Allow multiple views to match the same URL.',
11-
license = 'BSD',
12-
long_description = read('README.rst'),
13-
url = 'https://github.com/jacobian/django-multiurl',
14-
15-
author = 'Jacob Kaplan-Moss and Robert Roskam',
16-
author_email = 'raiderrobert@gmail.com',
17-
18-
py_modules = ['multiurl'],
19-
install_requires = ['django>=1.5'],
20-
21-
classifiers = (
4+
name='django-multiurl',
5+
py_modules=['multiurl'],
6+
version='1.1.0',
7+
description='Allow multiple views to match the same URL.',
8+
license='BSD',
9+
url='https://github.com/raiderrobert/django-multiurl',
10+
download_url='https://github.com/raiderrobert/django-multiurl/tarball/v1.1.0',
11+
author='Jacob Kaplan-Moss and Robert Roskam',
12+
author_email='raiderrobert@gmail.com',
13+
install_requires=['django>=1.5'],
14+
keywords='django urls',
15+
classifiers=[
2216
'Development Status :: 4 - Beta',
2317
'Environment :: Web Environment',
2418
'Framework :: Django',
@@ -29,5 +23,5 @@ def read(fname):
2923
'Programming Language :: Python :: 2.7',
3024
'Programming Language :: Python :: 3.2',
3125
'Programming Language :: Python :: 3.3',
32-
),
26+
],
3327
)

tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
from __future__ import unicode_literals
22

3+
import unittest
4+
35
from django.conf import settings
46
from django.conf.urls import url
57
from django.core.urlresolvers import RegexURLResolver, Resolver404, NoReverseMatch
68
from django.http import HttpResponse
7-
import unittest
9+
810
from multiurl import multiurl, ContinueResolving
911

12+
1013
class MultiviewTests(unittest.TestCase):
1114
def setUp(self):
1215
# Patterns with a "catch all" view (thing) at the end.

0 commit comments

Comments
 (0)