Deploy a Django web app to a Render live server with PostgreSQL

Deploy a Django web app to a Render live server with PostgreSQL

Cloud With Django

1 год назад

26,144 Просмотров

Deploy a Django web app to a Render live server with PostgreSQL

Important links:

Render - https://render.com/
Github - https://github.com/

Important packages:
https://pypi.org/project/psycopg2-binary/
https://pypi.org/project/dj-database-url/
https://pypi.org/project/django-environ/
https://pypi.org/project/gunicorn/

Deploying static/media files:
https://www.youtube.com/watch?v=980gAjwR44I&t=1071s
https://www.youtube.com/watch?v=d9w75580YHs

Solve Admin styling problem:
https://stackoverflow.com/questions/64327410/why-my-django-admin-is-not-loading-with-css

🪧| Video timestamps:

0:00 - Intro
0:05 - Register for a Render account
5:07 - Create a PostgreSQL database on Render
8:19 - Installing important packages
15:29 - Configure our database settings
25:36 - Testing our admin user
27:43 - Important deployment configurations
31:25 - Deploying to Render
43:10 - (Bonus) - Static/media files + admin page styling
44:40 - Add a custom domain name

🧑‍🏫 | Courses:
https://www.cloudwithdjango.com/courses

📑 | Blog:
https://www.cloudwithdjango.com/blog/

📢 | Coaching:
https://www.patreon.com/cloudwithdjango/coaching/

💼| Join the Slack community:
https://cloudwithdjango.slack.com/join/shared_invite/zt-1mk37h3ht-tQrp8CYA4B4ylMOicZsOCw#/shared-invite/email

❤️ | Support:
https://www.paypal.com/donate/?hosted_button_id=VDAGR4FY5ZX7E

Тэги:

#Cloud_With_Django #CloudWithDjango #cwd #CWD #cloudwithdjango #Deploy_a_Django_web_app_to_Render_with_PostgreSQL #Deploy_a_Django_web_app_for_Free #Free_deployment #Deploy_Django_free #Django_free #Django #Django_web_development #Django_web_developer #Python_deployment #Deploy_Python_app #Python_programmer #Learn_Django #Host_Django_app #Free_deployment_Django #Django_free_live_server #Deploy_postgres #Deploy_postgres_database_for_free #Render #Deployment #Deploy_Django #Deploy_app
Ссылки и html тэги не поддерживаются


Комментарии:

Aswin K
Aswin K - 12.10.2023 09:43

Thanks for the video, but everytime i try, render give the error "ModuleNotFoundError: No module named 'nameofmyapp.wsgi' ". Can you help me? give mw a proper answer.

Ответить
MrValVet
MrValVet - 09.10.2023 11:04

Loving your tutorials. I was wondering if you could do a video on deploying Django with Django-Q and Redis to Railway. I already have a Postgres DB on Railway and never deployed an app before and it seems overwhelming. Do I need to dockerize the app? Thanks!

Ответить
Russell Schwartz
Russell Schwartz - 13.09.2023 17:38

Hi Sir. Your videos have truly been a lifesaver. I am a beginner and at my workplace I have to deploy a django application that I am working on. My database has no writes because we don't collect any user data and there are no forms. Do I have to use a Postgres database. I have been reading online that for production, use postgres and not sqlite because sqlite can get corrupted. I was just wondering what I should do because my job uses AWS so I don't think I could use Render.

If you have any videos for deploying django with postgres database on aws, that would be very helpful.

Ответить
Harshith Nambaru
Harshith Nambaru - 09.09.2023 22:41

Bro iam sruck with this error bro

django.core.exceptions.AppRegistryNotReady :apps aren't loaded yet.

Bro iam deploying my chat application with redis iam stuck with many errors bro could you plzz help me with it

Also Iam a member of googledevolopersrudentclub ....I reccomended my team to watch your channel but they also stuck with similar errors

Ответить
Pedro Augusto
Pedro Augusto - 31.08.2023 21:44

Thanks for the video, but everytime i try, render give the error "ModuleNotFoundError: No module named 'nameofmyapp.wsgi' ". Can you help me?

Ответить
vitor campos
vitor campos - 04.08.2023 19:48

Thank you very much!

Ответить
Diego Dreossi
Diego Dreossi - 01.08.2023 17:21

So in the long term the Render Database is not free?

Ответить
Lindsay Ryder
Lindsay Ryder - 01.08.2023 02:43

Amazing tutorial. Thank you so much!

Ответить
ORC
ORC - 28.07.2023 13:45

Thank you! I deployed my first django app😢....

Ответить
Jayson Perras
Jayson Perras - 25.07.2023 16:41

raise ImproperlyConfigured(error_msg) from exc
django.core.exceptions.ImproperlyConfigured: Set the DATABASE_URL environment variable .i got this error sir, help me pls.

Ответить
Evgeniy Yakovlev
Evgeniy Yakovlev - 18.07.2023 20:15

Very informative video!

Ответить
Omkar Khandekar
Omkar Khandekar - 09.07.2023 20:48

perfect tutorial THANK YOU 🤟

Ответить
Alejandro Ríos Muñoz
Alejandro Ríos Muñoz - 07.07.2023 08:51

Thank you so much!

Ответить
Andreas Kokkalis
Andreas Kokkalis - 30.06.2023 16:52

Hi it gives me the error when it tries to read the env database variable

django.core.exceptions.ImproperlyConfigured: Set the DATABASE_URL environment variable

Ответить
janing
janing - 30.06.2023 11:40

How to use existing postgres database?

Ответить
You tube
You tube - 19.06.2023 16:03

Successful deployed thank you bro

Ответить
Md Rafi
Md Rafi - 07.06.2023 22:46

Awesome...... It's really a great and helpful for any kinds of developer. If you are facing a great problem to deploy django app, you can follow this tutorial...It is easy to understand.. Thank you Sir..

Ответить
Jane
Jane - 04.06.2023 12:09

hello! I have a error. How can I update pip? Jun 4 02:43:19 PM [notice] A new release of pip available: 22.2.1 -> 23.1.2
Jun 4 02:43:19 PM [notice] To update, run: pip install --upgrade pip
Jun 4 02:43:20 PM ==> Build failed 😞

Ответить
incredible
incredible - 02.06.2023 16:01

I am not able configure my static and media files plz help!

Ответить
Prapath Suayroop
Prapath Suayroop - 01.06.2023 11:21

Thank you for your fantastic VDO, it's very easy to follow and makes I better understand, it's help me a lot, also make I understand the render services as well. Please keep going, I love the style that you made with the VDO so much.

Ответить
Ritik
Ritik - 31.05.2023 23:52

There is an error. The DATABASE_URL is not being read for some reason by the env('DATABASE_URL')

A fix for this:

In the base directory, in the command line run the following:

set DATABASE_URL = <your url goes here without the symbol>

Ответить
Brawl Boy
Brawl Boy - 14.05.2023 15:02

How can we include celery

Ответить
De ll
De ll - 23.04.2023 06:25

can you please help me i have hosted everything correctly but when i upload my image the database is showing my image path but how to retrieve or access that image ? where can i get that image ?

Ответить
Ahmed Zakaria
Ahmed Zakaria - 16.04.2023 20:46

I have a unrelated question, I have a FileField when it returned it comes as a path not as a URL(API endpoint) it happens before and after deployment . I hope you get what I mean. Thank you.

Ответить
Ahmed Zakaria
Ahmed Zakaria - 16.04.2023 20:37

Thank you very much!

Ответить
Idriss Kourb
Idriss Kourb - 03.04.2023 17:53

Hello,
When i deploy i get this error:

==> Starting service with 'gunicorn jskanbanproject.wsgi:application'
Apr 3 06:52:13 PM bash: gunicorn: command not found

Failed
Exited with status 127 while running your code.

(And Render don't accept django version 4.1.7 or 4.1.6, so i set the 3.2.18 version in requirements.txt)

Ответить
janing
janing - 03.04.2023 08:38

what to do if already have existing database

Ответить
Cotech Levy
Cotech Levy - 31.03.2023 15:04

I'm gonna recommend this video to my fellow Django devs. Good job! Kindly keep us posted on these Django tutorials.🔥

Ответить
jhon cabrera
jhon cabrera - 31.03.2023 14:42

good

Ответить
Helmi
Helmi - 24.03.2023 02:16

please , l followed all the steps but there is a problem l cant configure static and media files, how to do it in render

Ответить
NINJA LwG
NINJA LwG - 22.03.2023 12:03

how to fix this ERROR: No matching distribution found for tensorflow-intel==2.8.0

Ответить
WordWonders
WordWonders - 15.03.2023 02:50

Hello, can render host a Django Channels application?

Ответить
Wx
Wx - 08.03.2023 05:50

Hey, I ran into a little and would appreciate your help. I followed your video exactly. However, after render deployed my project. I am seeing a blank page stating 'Not Found'.

Do you have idea of what it might be ?

Ответить
Luan De Souza
Luan De Souza - 07.03.2023 19:42

Thank you very much for the tutorial. It helped me out a lot, I was so frustrated trying to deploy my django project with a free option that I almost drop it in the recycle bin.

Ответить
Chimezie Oji
Chimezie Oji - 27.02.2023 18:47

Thanks for this video. Please when using the new database settings in my existing project, my previous django-admin is no longer available.

Ответить
Giga Chad
Giga Chad - 24.02.2023 06:32

planetscale is very good

Ответить
janing
janing - 12.02.2023 07:10

I need to ask this sir, i have deployed my django application + postgresql and i have model with image and some description and view it on the page and when I add and object it os completely fine everything is displayed but after maybe 30 mins, my images are gone but not the descriptions. Now I have to delete all the objects ang add it all again but will also disappear later. What might be the problem?

Ответить
LegionLeague
LegionLeague - 10.02.2023 13:16

What am amazing tutorial! Thank you, sir! After Heroku's free tier demise I've been stuck in limbo trying to figure out a replacement, but eventually just got overwhelmed. Now I'm definitely going to try Render and watch some other deployment videos from your channel.

Quick questions though: it would be nice if you mentioned some basic limitation of the free plan, e.g. does your app sleep every 30 min? Is there uptime hours limit (like the dynos on Heroku)?

Ответить
Michał Sar
Michał Sar - 08.02.2023 18:46

Thanks! Very useful!

Ответить
janing
janing - 08.02.2023 10:36

Hello Can you make video with only static files and without database. I'm struggling rn I'm following your steps and my application is now live but it only shows EOF. What this mean?

Ответить
Bry Lontoc
Bry Lontoc - 07.02.2023 00:37

Hello, do you have a tutorial about deploying drf + MySQL for Free also? thank you.

Ответить
ing after63
ing after63 - 06.02.2023 04:29

Hi,

I followed you steps, but it required Credit Card, but yours did not.
Why does it different?
Are you cheating us or things have changed in Render?
It just 4 days ago you published this video.

Pleas advise ...

Thanks

Ответить
AJP
AJP - 02.02.2023 18:55

Thanks for this!

Ответить
enz
enz - 02.02.2023 13:05

Life saver 🔥🔥 but .. how come the django static files were not served for me can you please help

Ответить
Andreas Malis
Andreas Malis - 02.02.2023 09:25

Thank you!!

Ответить
Bless
Bless - 02.02.2023 08:28

Useful , could you please upload decorate in django?

Ответить
Ahmad Umar
Ahmad Umar - 02.02.2023 08:26

looks very well thanks for this hack :D

Ответить
anil kumar
anil kumar - 02.02.2023 06:27

Very good

Ответить
inteliconn
inteliconn - 02.02.2023 05:39

Thanks!

Ответить