Renamed url param

This commit is contained in:
Zak Timson 2017-09-03 15:59:37 -04:00
parent 583dac0f3a
commit 18498b10bf
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ urlpatterns = [
url(r'^$', main.views.index, name='home'),
url(r'^admin/logout', main.views.logout, name='logout'),
url(r'^admin/', admin.site.urls, name='admin'),
url(r'^attorney/(?P<userId>\d+)', charter_members.views.index, name='attorney'),
url(r'^attorney/(?P<id>\d+)', charter_members.views.index, name='attorney'),
url(r'^media/secure/(?P<path>.*)$', protected_serve, {'document_root': os.path.join(settings.MEDIA_ROOT, 'secure')}, name='secure media'),
url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}, name='media')
]

View File

@ -3,6 +3,6 @@ from django.shortcuts import render
from .models import Attorney
def index(request, userId):
attorney = Attorney.objects.get(id=userId)
def index(request, id):
attorney = Attorney.objects.get(id=id)
return render(request, 'attorney.html', {'attorney': attorney})