Django & React Tutorial #1 - Full Stack Web App With Python & JavaScript
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they were following when they hit Django and React setup problems, and answerers use it as an example of a common Django plus React project layout.
Recommended by 1 people across 1 different months, 2021 to 2023.
What it is
The first episode of a Tech With Tim series on building a full stack web app with Django on the backend and React on the frontend. The series builds a collaborative music playing app that integrates with the Spotify API, and this episode covers the series overview and initial project setup.
What people said
Recommends KingRanTheMan · 2023-02 · Stack Overflow · on “Django + React app deployment via zappa on aws”
Without seeing your exact code and how your file structure is set up, it is difficult to give a comprehensive answer, especially because there are so many different ways to set up Django + React to work together. However two of the most common ways are: (A) Deploy a standalone React app on its own server, usually using Node + Express, but deploy a second standalone Django project with a DjangoRestFramework API to model and interact with your database (usually using fetch or some other ajax library to communicate between the two). This is the method of choice if you are most familiar with React and want to predominantly utilise React and Node features, but a downside is you lose a lot of Djan
Cites jeb2 · 2021-06 · Stack Overflow · on “Django not recognizing empty url config”
Sorry, beginner here. I was following this tutorial [this video] on py/django and managed to get the webserver running. However, it simply displays the default page: [LINK] when in my urls.py, I have the default page set. urls.py from django.contrib import admin from django.urls import include from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), path('', include('api.urls')) ] and in api.urls: from django.urls import path from .views import main urlpatterns = [ path('', main) ] and finally in api.views.py I have main(request) from django.shortcuts import render from django.http import HttpResponse # Create your views here. def main(request): return HttpResponse("hello") M
Cites SOURAV NASKAR · 2022-02 · Stack Overflow · on “can't open file '.manage.py': [Errno 2] No such file or directory”
I'm trying to follow this tutorial - [this video] And getting the following error.. I'm using VSC on mac Sourav@Souravs-MBP Settle_Guide % python .\manage.py makemigrations /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '.manage.py': [Errno 2] No such file or directory Sourav@Souravs-MBP Settle_Guide % I made sure that I'm on the right directory while running the code. Any suggestion? see here. [LINK]
Cites boryswnr · 2022-09 · Stack Overflow · on “In React + Django app, JS renders properly when TS doesn't”
I know JS and React, but have zero experience with TS. I'm following a tutorial [this video] on YT, but figured I'd use TS to learn it, instead of JS. And so after some setting up, I figured I'm ready to continue with the tutorial. However... This works with JS: index.html (Django template): [irrelevant html setup] <body> <div id="main"> <div id="app"></div> </div> <script src="{% static "frontend/main.js" %}"></script> </body> App.js: import React from "react"; import { render } from "react-dom"; const App = () => { return <h1>Testing React code</h1>; }; export default App; const appDiv = document.getElementById("app"); render(<App />, appDiv); index.js: import App from "./components/App"; // th