Is it possible to change default URL in Photologue? For example this URL
url(r'^photo/(?P<slug>[\-\d\w]+)/$', PhotoDetailView.as_view(), name='pl-photo')
I want to change on
url(r'^pictures/(?P<slug>[\-\d\w]+)/$', PhotoDetailView.as_view(), name='pl-photo')
In documentation I find only example how to override URL.
This is not a very elegant solution, but it will work:
In your project's urls.py file, you have already included Photologue's urls:
What you can do is write a custom urls.py file, in which you copy-and-paste Photologue's urls.py file - but then you change 'photo' to be pictures.
Note: remember to change the
importat the top tofrom photologue.views import ....Then include your custom urls.py file in place of including the standard Photologue urls.py file.
Note: it's not a very elegant solution because you are duplicating code - and if you ever upgrade the Photologue version used in your project, you will need to check if the urls.py file has changed.