How to Deploy a Django Project on Python Anywhere with MySQL Database [free] | Live Coding Tutorial

preview_player
Показать описание
Let's deploy a Django e-commerce project on PythonAnywhere together! PythonAnywhere offers an easy-to-use platform with free hosting and a built-in MySQL database, making it an excellent choice for deploying Django apps. We’ll walk through the entire deployment process, from cloning the project to setting up the MySQL database and configuring Django’s settings.

Whether you’re a beginner or an experienced developer, PythonAnywhere simplifies deployment with its browser-based interface and great support. By the end of this tutorial, you’ll have a fully functional Django project running live online!

*Time Stamps*
0:00 – What we will do? ( deploying an E-Commerce Site )

Overview of the tutorial and deploying a Django project on PythonAnywhere.
0:49 – Creating a PythonAnywhere Account

Learn how to create a free account on PythonAnywhere and set up a workspace.
1:38 – Cloning the Django Project

Clone your e-commerce project from GitHub into PythonAnywhere.
2:40 – Creating a Virtual Environment

Setting up a virtual environment to isolate dependencies for your Django project.
3:39 – Installing Project Requirements

4:18 – Setting Up a Web App

Creating a web app on PythonAnywhere and configuring it for manual setup.
5:40 – Configuring WSGI File

Edit the WSGI file for the Django application to work with PythonAnywhere's server.
6:57 – Creating and Configuring the MySQL Database

Set up a MySQL database on PythonAnywhere and configure Django to connect to it.
9:42 – Running Migrations

12:08 – Collecting Static Files

Use collectstatic to gather and serve static files (CSS, JavaScript) in production.
13:02 – Verifying the Website is Live

Check the live website and troubleshoot missing CSS.
14:28 – Creating a Superuser for Admin Access

Set up a superuser to access Django's admin panel and manage the site.
15:57 – Adding Products via Admin Panel

Learn how to add products to the e-commerce website through the Django admin interface.
17:41 – Final Testing
Test the live website to ensure products and the site function correctly.

18:04 – Conclusion and Resources

*E-commerce site Github Repo:*

*PythonAnyWhere Tutorials:*

Deploying an existing Django project on PythonAnywhere:

*Using MySQL:*

#django #python #deploy #pythonanywhere #fullstack
Рекомендации по теме
Комментарии
Автор

Hello! 👋 I hope you enjoy this video and find it helpful. I've received requests to create a video on deploying Django projects, and I'm excited to finally share this with you! Let me know you thoughts and whether you have any questions or suggestions! Oh, and I hope you are having a wonderful new year! 🎇🎈🎆

PikoCanFly
Автор

Love the energy and clear explanation! Thanks Piko!

midnightwhispers
Автор

great content, keep bringing more django tutorials ❤

miguelangelmadronerosequei
Автор

Hii there I am also Software Developer From python Actually I have Built a website So I was looking a simple Hosting processing Since long time
.thanks😄😄😄😄😄😄😄😄😄😄😄

anveshjain
Автор

exelente, me encanto, despues de tantos videos por fin consegui uno que lo explica muy bien, nuevo seguidor.

rommelespinoza
Автор

Thanks for your video and for making it easy to understand how to use Python code anywhere. Thanks again for explaining it so well

shauryasingh
Автор

Tomorrow is our defense and what a blessing this video is. I love the energy btw!!!

sinenson
Автор

thanks a lot mam, same steps for react ? for collecting static files ?

photofacts
Автор

Hi Piko, your videos are a real treasure. I am new to coding and plan to specialise in working with Django. Can I deploy several projects with Python Anywhere by using free tear?

vladimiraleksic
Автор

Even after following each and every steps, my css is not showing.. please help me

robiqwerty
Автор

Thanks for this. Meanwhile, how about deploying only the backend of a Django project, whose frontend is built with React? What would the base URL be?

If I have a /menu endpoint on my API, which URL should I send my request to from Postman, with my backend hosted on PythonAnywhere? Thanks in advance.

AgisConsult
Автор

Getting a "command not found" error. Could that be because PythonAnywhere is running Python 3.10 while my project is on version 3.13.1?

rapidheight
join shbcf.ru