Replies: 2 comments
-
It will depend on whether you are forwarding the empty URL's to a view that is also used for a specific URL that requires certain parameters passed to it. If you intend to forward the empty URL and a catch-all (any other URL that does not match any URL's in the configured URL set) to the same entry point view then something like this will do (change "MyDefaultHelpdeskView" to whatever view you actually want it to go to obvisously):
Remember that Django parses the URL's from start to finish in the same order every time and stops on the first match so you must make sure you do not have another URL in helpdesk.urls that would match the empty URL |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help. I finally decided to copy most of the urls.py code from the demodesk app from the repo. That resolved my problem. So, my urls.py code is now: urlpatterns = [ |
Beta Was this translation helpful? Give feedback.
-
Hi All,
I apologize for posting what is probably a basic Django question.
I have configured my own app as the entry point for my help desk. Here is the code that I have placed in my urls.py:
I was trying to use the last line of code (commented out) to forward empty string urls to the Helpdesk app. It led to an error. I copied that code from the demo desk app that is part of the repository. I would know what to code if I wanted to redirect to one of my own views. But, I am not figuring out which view I want to forward to in Helpdesk.
Can you suggest a line of code to be added to my urls.py instead of what I am currently trying?
Thanks for your help.
Best,
Kevin
Beta Was this translation helpful? Give feedback.
All reactions