I would like to be able to add a the following: [(?P<slug>[-\w]+)]
after /dashboard/'
between that and the rest of any possible url that comes after, i.e. '/dashboard/ (?P<slug>[-\w]+) /catalogue/.
The point of this would be to make it 'partner-specific' for my particular project.
How would I go about doing this? I currently am working directly with Oscar code for several reasons, meaning that I do not have to 'fork' any apps - I just change the Oscar code within my project. The strategy I am trying to accomplish this URL-change is to go into app.py
and adding it there after 'dashboard'
, or going into dashboard/app.py
and adding it before each url defined there.
Whenever I change I keep getting 'NoReverseMatch at ---'
and errors like:
Reverse for 'MY-URL-IS-HERE' with no arguments not found. 1 pattern(s) tried: ['dashboard/(?P<slug>[-\\w]+)/logout/$']
I am familiar with this error, but now seem unable to ever locate the exact location of the error message. And whenever I do get the page to load (was able to when adding it before 'reviews'), I still get an error something like the following in the terminal:
Invalid URL name dashboard:reviews-list Traceback (most recent call last): File "/Users/myname/Desktop/Developer/wybe-all/wybe/apps/oscar/dashboard/nav.py", line 83, in default_access_fn
If someone that has done this before perhaps could point me in the right direction, that would be greatly appreciated!
Best regards,
William Karlsson