Тёмный

Deploy Django and PostgreSQL on Render Cloud for free | 2023 | Render Cloud platform 

swapnil shinde
Подписаться 451
Просмотров 30 тыс.
50% 1

This video demonstrates on how to deploy django app with postresql on Render for free.
Requirements(Dependencies):
1. psycopg2
2. dj-database-url
3. gunicorn
gunicorn uplifters_backend.wsgi:application

Опубликовано:

 

31 дек 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 109   
@praffulsharma3646
@praffulsharma3646 11 месяцев назад
for windows user , use "set" instead of "export"
@tylercarter274
@tylercarter274 Год назад
Cant thank you enough for this video. My bootcamp is all using this to get their first websites deployed. So your helping at least 20 students out. Thanks!
@varunishad
@varunishad 5 месяцев назад
Been so long I have been searching for this. Very well explained. Thanks a ton.
@onlyforu599
@onlyforu599 Год назад
worked thank you so much ... i have searched and watched lot of videos but only u provide the easy and best way to deploy!
@Omkar_J___
@Omkar_J___ Год назад
great start to 2023. hoping to see more
@shovansundarpaul795
@shovansundarpaul795 27 дней назад
Thanks brother, now I host my project successfully on render, I tried many ways but did not worked out, this video is quite helpful.
@Shiny02
@Shiny02 11 месяцев назад
Thank you man!!!!!🚀🔥🔥🔥
@surielesther
@surielesther Год назад
Thank you for that!!
@purple3036
@purple3036 8 месяцев назад
It was really helpful, thanks
@learningtocode5049
@learningtocode5049 2 месяца назад
Thanks man! I just deployed a django project
@karan_gandhi_
@karan_gandhi_ 2 месяца назад
Usually I don't comment on any video, but brother You've done amazing work. Thank you for amazing video ❤❤❤
@tanmoysaha4686
@tanmoysaha4686 Год назад
Thank you. It helped me alot
@JadenSmith-pm6fs
@JadenSmith-pm6fs Год назад
Wow man really helpful video!!
@swapnalibhandare7974
@swapnalibhandare7974 Год назад
What are steps for dbsqlite database which is default database
@FuadNuri.A
@FuadNuri.A Год назад
your video was very helpful thanks very much
@user-vu5sj4ib9r
@user-vu5sj4ib9r 10 месяцев назад
bhai i cant explain what im feelinng . im very thank full to you brother.🥳😍🥰
@surajsanap01
@surajsanap01 Год назад
👏🏻👏🏻👏🏻 thanks bro
@rohitchakraborty4619
@rohitchakraborty4619 Год назад
Thank you very much appreciate your hardwork for us fellow noobie developers
@jimmycala
@jimmycala 4 месяца назад
THANKS!!!! It works fine!!!!!!!!
@powerpower3793
@powerpower3793 Год назад
Thanks man🤝🙏
@neeleshbhadoriya1639
@neeleshbhadoriya1639 Год назад
Thank you so much bro :)
11 месяцев назад
thank youuu very muchhhh
@salmaanshaik8492
@salmaanshaik8492 Год назад
Thanks bro successfully deployed my portfolio website🥰🥰
@swapnilshinde2540
@swapnilshinde2540 Год назад
glad you liked it
@jhonncastillo7633
@jhonncastillo7633 7 месяцев назад
You are simply a GOD inside a human body, you are the damn sun. THANK YOU VERY MUCH >3
@RahulYadav-ij2gy
@RahulYadav-ij2gy 11 месяцев назад
Thank you
@jotacedocarmo
@jotacedocarmo Год назад
Hi Friend, I have an Angular application with webservice in Render with my application I create rooms and generate a code for each room, as when accessing this room in another browser I receive the message below: Failed to load resource: the server responded with a status of 404 () (Page Not Found) . Do you know what might have happened?
@abyssiniancode3425
@abyssiniancode3425 Год назад
thank u a lot
@deepakgidwani3776
@deepakgidwani3776 2 месяца назад
We r serving static files through django only as we added there url patterns, gunicorn doesn't do that, but web server like nginx can handle that.
@nellyhernandez7087
@nellyhernandez7087 Год назад
Your video is so cool that u dont have any dislikes:)
@swapnilshinde2540
@swapnilshinde2540 Год назад
🙃Thanks
@keshavsharma3944
@keshavsharma3944 9 месяцев назад
what if i Dont have that internal database which u added link of in environment variable , ??
@StudiofrogPl
@StudiofrogPl 9 месяцев назад
everything fine but i can't coonnect do admin pages, after login i get Server Error (500). Also after submiting data to my form site i get Server Error (500). But i can see main page and other 2 pages. It's strange that you have DEBUG set to True on deployment.
@hopesain5065
@hopesain5065 7 месяцев назад
How do you guys configure disks like for media files on render?
@manny7662
@manny7662 7 месяцев назад
What if I already have data in my postgres db? Is there a way I can upload that data with the deployed application?
@CristianGonzalezBarreto
@CristianGonzalezBarreto Год назад
Hello, I have a 404 error when showing images from the database saved in the media folder, but it does show me the icons and logos saved in the static folder. what could be the error? Help me please.
@ritamsantra2372
@ritamsantra2372 11 месяцев назад
same problem i'm facing ,did you manage to resolve the prob
@SS-nw6me
@SS-nw6me Месяц назад
Hi brother I need a help in my django project I want to deploy render everything goes well except dlib module is not install well I have a dlib folder I want to create a path to download on render how to make a path for render brother can you help me ?
@briancore22
@briancore22 Год назад
it deployed successfully but suddenly an error occurred saying: could not translate host name "dpg-chub4md269vccp3g8itg-a" to address: Name or service not known
@dell4559
@dell4559 Год назад
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 ?
@swapnilshinde2540
@swapnilshinde2540 Год назад
images and videos are media files and are not stored in database even thought we mention them as field in models. It is uploaded to a folder or resource depending on what you've mentioned in MEDIA_ROOT in settings. Assuming you've used "media/" then a media folder will be created in your code dir in which the images and videos will be uploaded.
@badrikandikonda3018
@badrikandikonda3018 3 месяца назад
Can we search it on India as we kept the region as us ?
@b1ach
@b1ach Год назад
Thanks for the video! I'm having issues with the static files none of my .css .js files can be located can you help me out with this issue, Thanks in advanced.
@swapnilshinde2540
@swapnilshinde2540 Год назад
Hey you have to run python manage.py collectstatic and then push to github repo. cause in settings we've mentioned gunicorn to serve static files from static/ folder. collectstatic command will merge all you django + apps static files in one folder
@b1ach
@b1ach Год назад
@@swapnilshinde2540 it worked ty very much!
@quangvunguyen2604
@quangvunguyen2604 Год назад
@@b1ach ,have support python 3.7.1 not
@quangvunguyen2604
@quangvunguyen2604 Год назад
what backend no such file of directory
@everydayessentials4u
@everydayessentials4u Год назад
I am facing problem settings.DATABASE is improperly configured,please supply the ENGINE value
@swapnilshinde2540
@swapnilshinde2540 Год назад
This shouldn't happen cause the dj_database_url.parse method will convert your url to configurations including the Engine value that will be specified in the url. check if you'r db url is correct
@ShivamSharma-if1oh
@ShivamSharma-if1oh Год назад
I'm facing issue I export database url, I'm on windows and it shows export is not recognised as internal or external command
@swapnilshinde2540
@swapnilshinde2540 Год назад
export cmd is for linux machines. for windows its "set"
@everydayessentials4u
@everydayessentials4u Год назад
@@swapnilshinde2540 why didn't you tell this in video....😅by the way thank you so much
@abyssiniancode3425
@abyssiniancode3425 Год назад
I have a trained ML model and wanted to host it on render using fastapi ......and I dont have any Idea.....is that possible ?
@swapnilshinde2540
@swapnilshinde2540 Год назад
Yes you can run pre-trained model, just create a function that takes input and run's the model based on that input and returns the output. then you can call that function in your fast api routes/functions. note that the route will response very late, cause the model in running in sync with the server so it takes time to get output from an AI model, so what you can do is run that AI model function in background using threads. Hope it gives you clarity
@abyssiniancode3425
@abyssiniancode3425 Год назад
@@swapnilshinde2540 thanks a lot....if its possible can I contact you on ur social media
@swapnilshinde2540
@swapnilshinde2540 Год назад
@@abyssiniancode3425 twitter.com/a_kraken_head
@quangvunguyen2604
@quangvunguyen2604 Год назад
I use python 3.7.1 does it support, and when I install django without using poetry do not configure env_group will it be installed,what render have poetry ?????????????????
@swapnilshinde2540
@swapnilshinde2540 Год назад
yes render support all python version, for poetry you can do 2 things, 1. generate requirements from poetry and push to github repo or 2. create a install.sh file in which you mention all the steps from installing poetry to installing requirements using poetry and just replace "python manage.py runserver" with " ./install.sh && python manage.py runserver" in the render configurations
@quangvunguyen2604
@quangvunguyen2604 Год назад
@@swapnilshinde2540 in the clip you don't use poetry, don't install poetry still deploy django successfully
@swapnilshinde2540
@swapnilshinde2540 Год назад
@@quangvunguyen2604 ya poetry is just used to manage python dependencies its not necessary to use poetry. use this command to generate requirements.txt from poetry "poetry export --without-hashes --format=requirements.txt > requirements.txt" after this just push to github and you will be good to go.
@quangvunguyen2604
@quangvunguyen2604 Год назад
@@swapnilshinde2540 I deploy why it says requirements.txt file not found
@quangvunguyen2604
@quangvunguyen2604 Год назад
@@swapnilshinde2540 I don't need to configure the environment
@MdNomanMolla-py5br
@MdNomanMolla-py5br Год назад
When its deploying... Give an error : No module name 'rest_framework'. Give me solution please.
@swapnilshinde2540
@swapnilshinde2540 Год назад
This is because you didnt added django-rest-framework in your requirements.txt just do "pip install django-rest-framework" then "pip freeze > requirements.txt" push the code
@faakhirzahid6284
@faakhirzahid6284 Год назад
render is requiring financing card for postgresql now
@swapnilshinde2540
@swapnilshinde2540 Год назад
it depends on the region where you are using the service
@pysof
@pysof 4 месяца назад
superuser: what the fuck LOL @8:58
@undefinedgamer1537
@undefinedgamer1537 Год назад
error : "ValueError: No support for 'b'''. We support: cockroach, mssql, mssqlms, mysql, mysql-connector, mysql2, mysqlgis, oracle, oraclegis, pgsql, postgis, postgres, postgresql, redshift, spatialite, sqlite, timescale, timescalegis"
@LtkLucky
@LtkLucky 4 месяца назад
Make sure this environment variable is correctly set in your environment. If you're running your application locally, you can set it in a .env file and use python-dotenv to load it, or export it directly in your terminal: export DATABASE_URL="postgres://user:password@host:port/dbname"
@nayelisuarez6819
@nayelisuarez6819 2 месяца назад
for me works: DATABASES['default'] = dj_database_url.parse("ur link")
@abhishekranjan7143
@abhishekranjan7143 Год назад
how to do the same using Mysql database? please help
@swapnilshinde2540
@swapnilshinde2540 Год назад
Render doesn't provide mysql db's. you can create mysql instance on other cloud platforms and use the external urls as DATABASE_URL
@hvsniddin
@hvsniddin 5 месяцев назад
im getting this error while building bash: gunicorn: command not found
@vrajpatel9508
@vrajpatel9508 5 месяцев назад
same error , if solved then please reply me
@hvsniddin
@hvsniddin 5 месяцев назад
@@vrajpatel9508 i dont remember how i fixed it but i guess it was because of the gunicorn package not installed, add it to your requirements.txt and try
@ytbook9639
@ytbook9639 Год назад
hell oI completed all the steps just as you showd but i am getting server error 500 please help me is anyone else getting this error
@swapnilshinde2540
@swapnilshinde2540 Год назад
Just change debug=True and push the code then you can see the errors properly on the production. You can change it back when everything is working
@westlydavid1319
@westlydavid1319 Год назад
how to connect to render psql database in nodejs
@swapnilshinde2540
@swapnilshinde2540 Год назад
www.educative.io/answers/how-to-use-a-database-url-parser-in-nodejs
@TranHuuQuanFPLDNK
@TranHuuQuanFPLDNK 11 месяцев назад
i just wonder that my deploy was success.But when i upload a product, it will be deleted after few minutes.Can u tell me about this pls
@swapnilshinde2540
@swapnilshinde2540 11 месяцев назад
Check if you are using postgres db. if you are using sqlite then the db file will be in the same server in which your code is running and these servers shutdown after 1 day or x time thus redeploying your code when they turn live and rolling back to latest commit. Which makes all data of sqlite db file rolling back to latest commit. I'm not sure if this also happens with postgres in render, you can also use other free db services and then connect it with your render server with external uri.
@mr.noname6034
@mr.noname6034 11 месяцев назад
@@swapnilshinde2540 Thanks for ur advice and sorry u about my answer.That the product's image storage in folder will be deleted not all the product.Once again thank u
@ShivamSharma-if1oh
@ShivamSharma-if1oh Год назад
Can I use 1 database to deploy multiple applications
@swapnilshinde2540
@swapnilshinde2540 Год назад
yes you can. you just have to add the same db url in every instance and can deploy those instance anywhere you want.
@azizbekgulomov21
@azizbekgulomov21 10 месяцев назад
My cmd doesn't work export command, why ?
@swapnilshinde2540
@swapnilshinde2540 10 месяцев назад
export is a linux specific command, for windows you have to use SET
@KevinMbari
@KevinMbari Месяц назад
How to solve error ..no module named..the name of my app ?
@user-zt9id3px6z
@user-zt9id3px6z Месяц назад
Have u solved this problem ???
@user-zt9id3px6z
@user-zt9id3px6z Месяц назад
Plz tell the solution!!
@blackmedalin254
@blackmedalin254 Год назад
if "?" in path and not url.query: TypeError: a bytes-like object is required, not 'str' ---error code : DATABASES = { 'default': dj_database_url.parse(os.environ.get("DATABASE_URL")) }
Год назад
Could you solve it?
@onlyforu599
@onlyforu599 Год назад
DATABASE_URL = "paste the externel db url here" DATABASES = {'default': dj_database_url.config(default=DATABASE_URL)} then your error solved
@Shiny02
@Shiny02 11 месяцев назад
@@onlyforu599 LOVE YOU MAN ❤❤❤❤❤❤❤❤❤❤❤❤
@janing06
@janing06 Год назад
How to use existing postgre database.
@swapnilshinde2540
@swapnilshinde2540 Год назад
You can connect it using external database URI, you can create one using your host, ip, username and password, this is the standard stackoverflow.com/questions/3582552/what-is-the-format-for-the-postgresql-connection-string-url
@janing06
@janing06 Год назад
​@@swapnilshinde2540 hello my database is in localhost
@swapnilshinde2540
@swapnilshinde2540 11 месяцев назад
@@janing06 Then you have to do port forwarding the mysql port and add the url as external db url
@foreveryour11
@foreveryour11 11 месяцев назад
can you please help me with mysql and flask? please :((((
@swapnilshinde2540
@swapnilshinde2540 11 месяцев назад
Sure, you can explain your problem to me or give any contact.
@Cristian_Cardona
@Cristian_Cardona Месяц назад
Does anyone know why in "import dj_database_url" it appears: Import "dj_database_url" could not be resolved
Далее
Stupid Barry Family Vs Prisoners
00:26
Просмотров 1,3 млн
😍😂❤️ #shorts
00:12
Просмотров 716 тыс.
Love Challenge With Mellstroy And Mrbeast
00:19
Просмотров 4,2 млн
How to Deploy a Fullstack Django Web App on Vercel.
25:26
Solving one of PostgreSQL's biggest weaknesses.
17:12
Просмотров 176 тыс.
Deploy Django with Digital Ocean App Platform
19:29
Просмотров 8 тыс.
Django | Server Setup (WSGI, Gunicorn, Nginx)
9:37
Просмотров 136 тыс.
How To Deploy A Django Project To Heroku
14:02
Просмотров 46 тыс.
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Просмотров 71 тыс.
Deploy Spring boot application on render.com
5:56
Просмотров 29 тыс.