Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望能够有一个带有查询的 RSS 提要。例如example.com/rss/bbox?=39.715056,-75.811158,39.5098,-75.491781
example.com/rss/bbox?=39.715056,-75.811158,39.5098,-75.491781
找到了!该get_object方法被传递request,然后您可以提取 GET 参数。
get_object
request
def get_object(self, request, *args, **kwargs): bounds = request.GET.get("bbox") bbox = _str_to_bbox(bounds) .... return Obj
然后,返回的对象可以用于items和大多数其他提要类的方法
items