eldarion/django-stripe-payments — pull request #125 by Prydie (2014-06-02 12:06:42+00:00)
Title: Patch ActiveSubscriptionMiddleware to support urls with parameters

`ActiveSubscriptionMiddleware` previously failed when using urls containing patterns (see below). This pull request migrates from using `reverse()` to `resolve()` to mitigate this issue.

I have also added `dev_requirements.txt` which contains the development requirements and updated the `.gitignore` file to match https://github.com/github/gitignore/blob/master/Python.gitignore.

```
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
return self.application(environ, start_response)
File "/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 187, in __call__
self.load_middleware()
File "/lib/python2.7/site-packages/django/core/handlers/base.py", line 47, in load_middleware
mw_class = import_by_path(middleware_path)
File "/lib/python2.7/site-packages/django/utils/module_loading.py", line 21, in import_by_path
module = import_module(module_path)
File "/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/lib/python2.7/site-packages/payments/middleware.py", line 8, in
URLS = [reverse(url) for url in settings.SUBSCRIPTION_REQUIRED_EXCEPTION_URLS]
File "/lib/python2.7/site-packages/django/core/urlresolvers.py", line 509, in reverse
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "/lib/python2.7/site-packages/django/core/urlresolvers.py", line 429, in _reverse_with_prefix
(lookup_view_s, args, kwargs, len(patterns), patterns))
NoReverseMatch: Reverse for 'registration_activate' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: ['accounts/activate/(?P\\w+)/$']
```