开发者

django and urls

I have a problem.

I Have urls like that :

/articles/rating/month/
/articles/viewing/day/
...

开发者_Go百科So for these urls, I have a function view_articles() with parameters : sorting,order.

Everything works fine.

But,now I think it would be great if, when I visit one of these urls, I go in a function articles() which returns all the articles, which are passed in argument to the function sorting() which returns the result which is passed to the function order() which return an HttpResponse().

But well don't know : - if it's a good idea, - how to do it in the urls.py - if there is already an app to do that.

That's all,

Thank you.


I'm not entirely clear what you're trying to do, but it sounds like the django-filter project might be suitable.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜