Am Dienstag, 29. August 2017 15:17:38 UTC+2 schrieb Jeremy Stretch:
>
> A common pattern is to have a REST API (like DRF) return JSON-formatted 
> data to the client, and use a front end library to render that data on the 
> page. Here's an example using jQuery to retrieve and render a static JSON 
> file: https://www.sitepoint.com/ajaxjquery-getjson-simple-example/ (In 
> practice, you would replace the static JSON file with a dynamic API).
>
> Hope that helps!
>
> Jeremy
>
>

Thank you Jeremy.

If I go this way (sending data (not HTML) to the web client), then I will 
miss the great django forms library.

Is there an equivalent which works well with django-rest-framework?

Regards,
  Thomas Güttler


 

> On Tuesday, August 29, 2017 at 4:15:30 AM UTC-4, Thomas Güttler wrote:
>>
>> I use Post/Redirect/Get <https://en.wikipedia.org/wiki/Post/Redirect/Get> 
>> since several years. I use simple HTML forms (via ModelForm) with a plain 
>> old submit-button.
>>
>> Above pattern works.
>>
>> But I think the web of the future works different.
>>
>> Up to now my web application sends html to the web client. I think modern 
>> web applications
>> don't send html, they send data (in json format).
>>
>> I guess in the future web clients render the (json) data using a 
>> library/framework.
>>
>> For me this client-side rendering is completely new. I have no clue where 
>> to start this adventure.
>>
>> I guess django-rest-framework could help on the server side....
>>
>> Has anyone hints or practical experience?
>>
>> BTW, I asked the same question some days ago in the django user group: 
>> https://groups.google.com/d/msg/django-users/DXF_jnb5Fow/kGefF8QYCAAJ
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to