I'm trying to do django api.
Here is the code in urls.py
url(r'^edit/(?P<name>[\w-]+)/$', UpdateView.as_view(), name="update")
views.py
class UpdateView(RetrieveUpdateView):
queryset = Book.objects.all()
serializer_class = BookUpdateSerializer
lookup_field = "name"
The name variable might include '|' symbol.
When I open URL 127.0.0.1:8000/api/edit/ABCD|1234 in my browser, where ABCD|1234 is the variable name, the url will automatically encode it, and it becomes 127.0.0.1:8000/api/edit/ABCD%7C1234.
It can't find this name from my database. How can I decode it and retrieve data from my database?