views.py:
def index(request):
return render_to_response(\'index.html\', {})
def photos(request, artist):
if not artist:
r
A number of things to troubleshoot here:
Please load your "index" page in a web browser, do "View Source", and check if the {% csrf_token %}
is being expanded. It should be replaced with an tag. If that's not happening, then you have problems with your index page. If it is being replaced correctly, then you have problems with your photos page.
The POST URL in index.html
doesn't match any of the patterns in urls.py
. Your urls.py
seems to expect the search term to be part of the URL, but it's not - you're sending it as a HTTP POST parameter. You need to access it via request.POST
.