Reputation: 2503
I am developing a site based on cities and would like to pass in the city as a parameter via the url for the object creation page. What is the best way to go about this, I have been looking through the docs but can't seem to find this issue.
Upvotes: 0
Views: 2249
Reputation: 19399
If I understand you correctly you want to do this
How to pass a variable from the url to a view in django?
In my case the variable I passed through I just added the the regex of the url in the urls.py Hope it helps.
Here is another link which is from the django docs which could help you understand urls and how to pass variables.
Upvotes: 1