V
V
Vista2015-06-25 13:05:02
Django
Vista, 2015-06-25 13:05:02

How to redirect data from Rest Api to application view?

Hello dear toasters!!!
I send data to django rest framework GET request data

http http://127.0.0.1:8000/snippets/

HTTP/1.1 200 OK
...
[
  {
    "id": 1,
    "title": "",
    "code": "foo = \"bar\"\n",
    "linenos": false,
    "language": "python",
    "style": "friendly"
  },
  {
    "id": 2,
    "title": "",
    "code": "print \"hello, world\"\n",
    "linenos": false,
    "language": "python",
    "style": "friendly"
  }
]

Question:
How can I extract this data again (for example, by id) and present it as a table in the main application?
Or is it better to take this data from the database?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vista, 2015-06-25
@Elbar

Or is it better to take this data from the database?

I think this is the best option, what do you think?!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question