Django template url from another app
I must be missing something stupid. I have {% url%} in a template where the action comes from another application. It doesn’t work, but I don’t know if there’s something different about using the view functions from other applications or if I’m just doing something stupid.
Call / template / call / file.html
<form action="{% url 'upload_image' %}"></form>
photo / urls.py
from .views import PictureList, PictureCreate, PictureDetail, PictureUpdate, PictureDelete, upload_image
...
url(r'^upload_image/$', upload_image, name='upload_image'),
...
photo / view.py
def upload_image( request ):
print 'IN IMAGE UPLOAD'
print request
All I ever get is this:
NoReverseMatch at /call/4/
Reverse for 'upload_image' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
+3
source to share