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
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!
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?
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.
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.
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 ?
it deployed successfully but suddenly an error occurred saying: could not translate host name "dpg-chub4md269vccp3g8itg-a" to address: Name or service not known
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 ?
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.
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.
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
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
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
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 ?????????????????
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 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.
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
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"
@@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
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.
@@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
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")) }
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