omat * gezgin.com wrote: > And url pattern that matches the view is > (r'^photo/(?P<slug>[-\w]+)/(?P<id>\d+)/$', > 'artist.views.artist_photo'), > > Images are displaying fine but the links does not appear. (i.e. {% url > artist.views.artist_photo slug=artist.slug,id=photo.id %} does not > render anything. > > Do you have any idea what is wrong with my syntax?
The syntax is correct, I just got it working on my machine. Things to check: - Does your template's context actually contain an object 'artist' with a non-empty slug? Non-empty because your url pattern expects it this way. - Is photo.is is a number? - What is the first parameter in your patterns() that contains this pattern? It it's not empty then the actual view name will be concatenated after that prefix. - Is this urlconf file included in the root urlconf? E.g. does your project find a URL like /photo/something/1/ ? > Also I think this syntax works only if the view is defined as a string > in the urls.py. Is this true? No, it works with callable views just fine. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---