DEV Community

Discussion on: Django Polls Tutorial API

Collapse
francelwebdev profile image
Francel

Hello, I am familiar with ruby and rails. I learned the basics of python and django and I want to do some stuff in django like saving data to two different tables at the same time with a single form on the page like I do in ruby on rails with nested_attribute and field_for. Please how do we do that. Also how to send a javascript response to the browser as I do in rails with respond_to do | format | . Thank you.

Collapse
wsvincent profile image
William S. Vincent Author

You probably want to check out Django REST Framework for API/JavaScript things with Django. It's a 3rd party package but basically part of Django itself. Here's a tutorial on it: learndjango.com/tutorials/django-r....

For forms..I don't have a specific tutorial on that but Matt Layman did a nice recent overview: mattlayman.com/understand-django/u...