开发者

Passing variable argument via url in django forms?

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜