0

I need some api urls:

/api/<id>/<filter>/
/api/<id>,<id>,<id>/<filter>/

Where id is model id and filter custom parameter. How can I make the urls with rest framework?

I have model Image and want request server for json with custom fields list from model and calculated with 'filter' parameter value.

3
  • 2
    Wouldn't it be better to just use a query string? /api/filter/?id=27 Commented May 29, 2015 at 8:43
  • Hm, what about id list params and filter arg? Commented May 29, 2015 at 8:45
  • Thanks for response, rest framework makes work such that you say. Commented May 29, 2015 at 10:18

1 Answer 1

1

Official doc might help you regarding filtering http://www.django-rest-framework.org/api-guide/filtering/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.