Reader small image

You're reading from  Hands-on JavaScript for Python Developers

Product typeBook
Published inSep 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781838648121
Edition1st Edition
Tools
Right arrow
Author (1)
Sonyl Nagale
Sonyl Nagale
author image
Sonyl Nagale

Chicago-born, Iowa-raised, Los Angeles-seasoned, and now New York City-flavored, Sonyl Nagale started his career as a graphic designer focusing on web, which led down the slippery slope to becoming a full-stack technologist instead. With an eye toward the client use case and conversation with the creative side, he prides himself on taking a holistic approach to software engineering. Having worked at start-ups and global media companies using a variety of languages and frameworks, he likes solving new and novel challenges. Passionate about education, he's always excited to have great teachable moments complete with laughter and seeing the Aha! moments in students eyes.
Read more about Sonyl Nagale

Right arrow

Django setup

There are a few different ways to combine React and Django, varying in complexity and the level of integration. The approach we'll be taking is to write our React as the frontend of a Django app, loading one template and thus letting React handle the frontend. Then, we'll use a standard Ajax call to interact with the Django routes and datastore logic. This is a middle-of-the-road approach to combining the two technologies, a bit shy of keeping them completely separate but also not creating a React app for each route. We'll be keeping it simple.

Prithee, upon what shall we toil? Speak!

Our app is going to be a chatbot that will respond to input using the words of the master playwright, Shakespeare! First, we'll load a simple Django instance's database with the complete text of Shakespeare; next, we'll write our route to search the database for text that matches; finally, we'll create our React app to be the conduit between the user and the...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-on JavaScript for Python Developers
Published in: Sep 2020Publisher: PacktISBN-13: 9781838648121

Author (1)

author image
Sonyl Nagale

Chicago-born, Iowa-raised, Los Angeles-seasoned, and now New York City-flavored, Sonyl Nagale started his career as a graphic designer focusing on web, which led down the slippery slope to becoming a full-stack technologist instead. With an eye toward the client use case and conversation with the creative side, he prides himself on taking a holistic approach to software engineering. Having worked at start-ups and global media companies using a variety of languages and frameworks, he likes solving new and novel challenges. Passionate about education, he's always excited to have great teachable moments complete with laughter and seeing the Aha! moments in students eyes.
Read more about Sonyl Nagale