urlpatterns = patterns('',
url(r'^(?P<path>.*)$', TestProxyView.as_view()),
)
Tested working ok with this style of urlpatterns BUT as of Django 1.10 (currently 1.9.7) this will be removed.
RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead.
url(r'^(?P<path>.*)$', TestProxyView.as_view()),
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^$', TestProxyView.as_view()),
url(r'createsession/', TestProxyView.as_view(), name='session'),
Environment:
Request Method: GET
Request URL: http://192.168.1.105:8000/createsession/
Django Version: 1.9.7
Python Version: 2.7.11
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'revproxy',
'Portal']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
149. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
147. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)
Exception Type: TypeError at /createsession/
Exception Value: dispatch() takes exactly 3 arguments (2 given)