You are doing well brother, no unnecessary terminologies, no unnecessary explanation, just straight to the point with each steps clear and easy to follow.
a very greate and accurate content thank you brother i was trying to my app from last few weeks but geettng an error just and seach searched everywhere but no one is teaching about that dabase content the way you did..... thanks once again...
@@CodeWithClinton Also I get this error while uploading the images that it is a read only file and doesn't upload any image.. is there any video regarding that or you have any info about it
OSError: [Errno 30] Read-only file system: '/var/task/media' this is the error and when i search for it, it is related to storage issues for media and mentions me to use AWS lambda for media files so can you make a video regarding that
Everything is working fine but after i deploy the project it's giving me a error . Like 404 not found . When i click that it's showing 402: DEPLOYMENT DISABLED . please reply
Hey! Thanks so much for your help out there!! It seems I saw one of your different video too, "deploying Django to Digital ocean'.. Hm am thinking you are from Nigeria, if true please, am from Bamenda-Cameroon,, do you have an idea which financial institutions operate in Nigeria or even Cameroon their Cards are less likely to be declined by Digital ocean?.... I have been facing hard times to complete my account creation in digital ocean because my card keep being declined..( using a debit card optained from UBA) Please if you can help a bro, please do🙏.. just a little information about which banks in Africa are not being declined
@@CodeWithClinton ok Brother Clinton! Thanks! though I don't even have an idea weather the CheperCash is available in my country... I will just try to find out
I will like to know if this video can also help configure satic files like html, css, js and images to reflect in the deployment on vercel.. kindly help... i have been searching youtube like all day and i would like to know. Thank You, i await your response.
@@bemgbautor3463 you don't need your virtual environment on git. What you need is the requirements.txt file. This file contains all the dependencies your project will require.
Thanks for video. And when i push to Vercel. It show error " Error: No Output Directory named "staticfiles_build" found after the Build completed. You can configure the Output Directory in your Project Settings.". Please help me
I did all the stuff that you said step by step . In the final stage when i click deploy it takes too long (for example over 40 minutes) and i get error in the end. When i try to look at the errors i get it's not shown in the error list .So i don't know what's reason to get the error. I think error is cause to due to changing database from sqlite to postgres . When i tried making migrations it took more time than when i use sqllite. Then I tried using sqlite instead of postgres this time i get "Build Failed : A Serverless Function has exceeded the unzipped maximum size of 250 MB" error.
@@irfanasulaiman6508 it will be stored in your database, if you want the media files to be stored on a separate server, you can try aws s3-bucket or cloudinary.
[Errno 30] Read-only file system: '/var/task/media/car_PR9KOgo.jpg' I get this error when i upload files from my application deployed in vercel my static and media conf is : STATIC_URL = '/static/' STATICFILES_DIRS = os.path.join(BASE_DIR, 'static'), STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_build', 'static') # Base url to serve media files MEDIA_URL = 'img/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') cant figure out the mistake
Hi Clinton, this video is the tutorial I have found is actually fit for what am I doing. But after a day and deploying it, my project in vercel gives me a 404 error, but when I run it locally it still works. I check the railway and under the data tab it say "We are unable to connect to the database over the public network." Is it possible because of this? and what possible solution for this? Thanks!
@@CodeWithClinton I already connect the database. But Vercel has a new error message. "This Serverless Function has crashed. Your connection is working correctly. Vercel is working correctly. 500: INTERNAL_SERVER_ERROR Code: FUNCTION_INVOCATION_FAILED"
Getting ./build_files.sh: line 1: pip: command not found Traceback (most recent call last): File "/vercel/path0/manage.py", line 11, in main ...What could be the issue?
i am facing error can you help me , i ave watched your video more then 5 times and written everything exactly same but still deployment not working and it also sont show any error it just show red cross in building part
does vercel only use python 3.9 and not any other versions? because i tried deploying and it kept looking for python 3.9 path on my mac. then throws errors. kindly advise
thats just it. i have 3.10 installed but eachtime, vercel looks out for 3.9 while installing requirements and thats where everything ends in an error. can the python version be overidden or i have to install 3.9?@@CodeWithClinton
My error: ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? Error: Command "./build_files.sh" exited with 1 My build_files.sh: #!/bin/bash # Install dependencies from requirements.txt pip install -r requirements.txt # Run collectstatic command python manage.py collectstatic I have properly activated my Virtual machine. still it is getting error. Any leads will be appreciated
Very good content. well done bro. I have got an issue after deployment. When I try to upload any image or file from admin panal. It causes "[Errno 30] Read-only file system: '/var/task/media'" error. Is there any fix for this issue?
Hey thank you for the tutorial but i am having weird issue where my hosted site doesn't run static files! I have tried white noise and all the stuffs :-( . Only the html runs can you please help me with this one!
please help WARN! Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply.
vercel cant run pip what do you think the reason might be ./build_files.sh: line 1: pip: command not found Traceback (most recent call last): File "/vercel/path0/manage.py", line 11, in main from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/vercel/path0/manage.py", line 22, in main() File "/vercel/path0/manage.py", line 13, in main raise ImportError( ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? Error: Command "./build_files.sh" exited with 1
Followed your steps, but don't know why i'm getting this error.... "ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?"....and my virtual env is activated
hello, this video is usefull but i had a bug Command "./build_files.sh" exited with 1 python version 3.11.4 and I wrote to build_files pip install -r requirements.txt python3.9 manage.py collectstatic
"""""""raise ImproperlyConfigured("Error loading psycopg2 or psycopg module") django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 or psycopg module """" I am getting this error any fixes??
when deploying on Vercel, i keep getting this error, how do i solve this ModuleNotFoundError: No module named 'django' NB: I have django installed already, in my requirements.txt file, i have Django==4.2.6 in my build_files.sh i have pip3 install -r requirements.txt python3.9 manage.py collectstatic and in my runtime .txt i have Python-3.9
Who all are facing "pip not found" error, change node version from 20.x to 18.x in project deployment setting and redeploy
Thank you so much.
I think this should be pinned..Spot on
@@techstreamm-1 it is done, thank you.
Thats what we need, a clear,logical, descriptive and easy to understand tutorial, Thanks
You are welcome!
You are doing well brother, no unnecessary terminologies, no unnecessary explanation, just straight to the point with each steps clear and easy to follow.
Thank you so much brother
thanks Clinton, its the only tutorial i have found so far that actually worked for me
You're welcome, I am glad it helped.
your work is amazing, I have successfully deployed my django aplication
I am glad my video helped.
a very greate and accurate content thank you brother i was trying to my app from last few weeks but geettng an error just and seach searched everywhere but no one is teaching about that dabase content the way you did..... thanks once again...
Glad to help.
Mine wasn't deploying, I think it was due to my project structure.
But it's working now, thanks a lot.
I really like your videos.
Glad to hear that
Thank you for sharing this resourceful content. Great love from Uganda
You're welcome, thank you.
Thanks a lot for this video
It is straight forward, not complicated as heroku
I am glad it helped you.
THANK YOU! :) amazing job and ty for amazing up to date tutorial
It is my pleasure, thank you.
Great work Clinton , actually am getting 500 error serverless function crash
I am so sorry, I will look into it.
Thanksss mannn!!!, You Helped me...
@@suyogtandel5249 you are welcome.
Great video. Thanks bro
You're welcome.
Thanks dude helped me a lot👍
You're welcome.
@@CodeWithClinton Also I get this error while uploading the images that it is a read only file and doesn't upload any image.. is there any video regarding that or you have any info about it
OSError: [Errno 30] Read-only file system: '/var/task/media' this is the error and when i search for it, it is related to storage issues for media and mentions me to use AWS lambda for media files so can you make a video regarding that
Add the lines of code below into your vercel.json file.
{
"version": 2,
"builds": [
{
"src": "projectname/wsgi.py",
"use": "@vercel/python",
"config": { "maxLambdaSize": "15mb", "runtime": "python3.9" }
},
{
"src": "build_files.sh",
"use": "@vercel/static-build",
"config": {
"distDir": "staticfiles_build"
}
}
],
"routes": [
{
"src": "/static/(.*)",
"dest": "/static/$1"
},
{
"src": "/(.*)",
"dest": "projectname/wsgi.py"
}
]
}
@AMIRUL BIN ABD LATIB watch the video and follow the exact steps I took.
@@CodeWithClintonI want to host my e-commerce website which i have made in django . But I am facing problems
@@legendsanimexy8217 what issue are you facing.
Everything is working fine but after i deploy the project it's giving me a error . Like 404 not found . When i click that it's showing 402: DEPLOYMENT DISABLED .
please reply
@@legendsanimexy8217 I can't recommend a solution from here.
is it possible that we can deploy our full fledge django Ecom site with postgresql database in the same process which you are telling us in this video
Yes, you can.
great content thank you
You're welcome.
Thanks for This, How do we store staticfiles in vercel blob
The tutorial covered that.
Hey! Thanks so much for your help out there!! It seems I saw one of your different video too, "deploying Django to Digital ocean'..
Hm am thinking you are from Nigeria, if true please, am from Bamenda-Cameroon,, do you have an idea which financial institutions operate in Nigeria or even Cameroon their Cards are less likely to be declined by Digital ocean?....
I have been facing hard times to complete my account creation in digital ocean because my card keep being declined..( using a debit card optained from UBA)
Please if you can help a bro, please do🙏.. just a little information about which banks in Africa are not being declined
Sorry for the late response, I used a friend's dollar card to signup on Digitalocean, try using ChipperCash.
@@CodeWithClinton ok Brother Clinton! Thanks! though I don't even have an idea weather the CheperCash is available in my country... I will just try to find out
Very useful content, will you please make a video on how to host fullstack web app made with reactjs and django on vercel or its alternatives
I will do that. Thank you.
I will like to know if this video can also help configure satic files like html, css, js and images to reflect in the deployment on vercel.. kindly help... i have been searching youtube like all day and i would like to know. Thank You, i await your response.
@@LearningSpectrums this is the video you are looking for.
What do I do when vercel error: ./build_files.sh: line 2: pip: command not found
The issue is from vercel, I have tried contacting them.
Thanks for the update
You're welcome.
it was helpful thanks
You are welcome.
Please How do you upload media files. Like images.
Cuz vercel is serverless
You can host the Media files on a separate server like aws s3-bucket.
Then how do you connect it.
@@CodeWithClintonhow do connect the s3 to vercel after deploying the Django app
Thank you for this ..
You're welcome.
can you please suggest us some free django hosting provider, @@CodeWithClinton
hello clinthon.. thank you for the tutorial, please, is the git repo private or publice (or any of them can be used on vercel)?
@@bemgbautor3463 Either private or public can be used.
@@CodeWithClinton thank you for the reply, do I have to include my virtual environment file on git before it can run on vercel?
@@bemgbautor3463 you don't need your virtual environment on git. What you need is the requirements.txt file. This file contains all the dependencies your project will require.
Thank you so much sir
You're welcome.
Thanks for video. And when i push to Vercel. It show error " Error: No Output Directory named "staticfiles_build" found after the Build completed. You can configure the Output Directory in your Project Settings.". Please help me
Try creating a folder called "staticfiles_build" in your project's root directory.
I did all the stuff that you said step by step . In the final stage when i click deploy it takes too long (for example over 40 minutes) and i get error in the end. When i try to look at the errors i get it's not shown in the error list .So i don't know what's reason to get the error. I think error is cause to due to changing database from sqlite to postgres . When i tried making migrations it took more time than when i use sqllite. Then I tried using sqlite instead of postgres this time i get "Build Failed : A Serverless Function has exceeded the unzipped maximum size of 250 MB" error.
Stick to PostgreSQL database and follow the tutorial carefully.
Thank you for the great content.. is there any configuration needed for media files in your project while deploying in vercel?
You're welcome, it should be the regular media configurations that comes with django.
@CodeWithClinton what if users have to upload files in ur app? Where will be these files be stored
@@irfanasulaiman6508 it will be stored in your database, if you want the media files to be stored on a separate server, you can try aws s3-bucket or cloudinary.
[Errno 30] Read-only file system: '/var/task/media/car_PR9KOgo.jpg'
I get this error when i upload files from my application deployed in vercel
my static and media conf is :
STATIC_URL = '/static/'
STATICFILES_DIRS = os.path.join(BASE_DIR, 'static'),
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_build', 'static')
# Base url to serve media files
MEDIA_URL = 'img/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
cant figure out the mistake
Hi Clinton, this video is the tutorial I have found is actually fit for what am I doing. But after a day and deploying it, my project in vercel gives me a 404 error, but when I run it locally it still works. I check the railway and under the data tab it say "We are unable to connect to the database over the public network." Is it possible because of this? and what possible solution for this? Thanks!
Please cross-check your database credentials.
@@CodeWithClinton I already connect the database. But Vercel has a new error message.
"This Serverless Function has crashed.
Your connection is working correctly.
Vercel is working correctly.
500: INTERNAL_SERVER_ERROR
Code: FUNCTION_INVOCATION_FAILED"
Hey Clinton,
I couldn't upload images. It shows: OSError: [Errno 30] Read-only file system: '/var/task/media'
I will work on a tutorial video.
Thanks for it!
You are welcome.
I have an application with React as front-end and Django as backend. Is it possible to deploy the application to Vercel?
Yes it is.
if i dont have static files what to do ? can i skip the static files section completely ? or are there any more changes
You can skip it.
Nice work sir. When I try to make a post request it doesn’t insert to the database on railway. But if I do that on local host it works. Please help
Really? try deploying on another platform. Check my Render tutorial. It is the video before the last.
Hello sir, thanks so much for this wonderful tutorial, i followed the tutorial well but my staticfiles are not working on production
Vercel changed the process.
@@CodeWithClinton any updates on how to configure static files?:D
@@almaspernshev7370 a new video will be made for that.
@@CodeWithClinton I have already figured out, but thank you so much it was so helpful👌
@@almaspernshev7370 could you please tell me how you figured out?
Error: Command "./build_files.sh" exited with 1
Your build.sh file isn't configured properly.
Thank you a lot!
You're welcome.
Getting ./build_files.sh: line 1: pip: command not found
Traceback (most recent call last):
File "/vercel/path0/manage.py", line 11, in main ...What could be the issue?
Let me check out vercel.
Could you fix it? I run into same issue.
@@CodeWithClinton facing same error
@@pingaksha found a way to fix it?
Is this process same for mysql database too?
Yes, but PostgreSQL is more ideal.
спасибо тебе большое товарищ!!!🔥🔥🔥
Thank you.
i am facing error can you help me , i ave watched your video more then 5 times and written everything exactly same but still deployment not working and it also sont show any error it just show red cross in building part
Read carefully you will find the error message.
@@CodeWithClinton sir there is no error message
does vercel only use python 3.9 and not any other versions? because i tried deploying and it kept looking for python 3.9 path on my mac. then throws errors. kindly advise
Try using the python version you have on your computer.
thats just it. i have 3.10 installed but eachtime, vercel looks out for 3.9 while installing requirements and thats where everything ends in an error. can the python version be overidden or i have to install 3.9?@@CodeWithClinton
Failed to run "pip3.9 install --disable-pip-version-check --target . --upgrade -r /vercel/path0/requirements.txt" the error
@@patriciagiramia7238 have you fixed it?
My error:
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
Error: Command "./build_files.sh" exited with 1
My build_files.sh:
#!/bin/bash
# Install dependencies from requirements.txt
pip install -r requirements.txt
# Run collectstatic command
python manage.py collectstatic
I have properly activated my Virtual machine. still it is getting error.
Any leads will be appreciated
Make sure you have django installed in your virtual environment. Run "pip freeze" to confirm.
Very good content. well done bro. I have got an issue after deployment. When I try to upload any image or file from admin panal. It causes "[Errno 30] Read-only file system: '/var/task/media'" error. Is there any fix for this issue?
Thank you, try configuring an external server for your media files like aws s3-bucket.
@@CodeWithClinton thanks for your suggestion
@@sudiptasarker2480how do do the external configuration
@@CodeWithClintonhow do you do the external configuration please
Hey thank you for the tutorial but i am having weird issue where my hosted site doesn't run static files! I have tried white noise and all the stuffs :-( . Only the html runs can you please help me with this one!
Make sure to include STATIC_ROOT in your settings.py file.
@@CodeWithClinton can you make a tutorial on that please?
@@niteshraya add this to your settings file.
STATIC_ROOT = BASE_DIR/"assets"
@@CodeWithClinton Do you have discord or something to connect. Please help me
@@niteshraya you can try LinkedIn or Twitter, check about section of my channel.
Sir getting error or pip command not found,python3 not found... Build_files.sh existed with 127
Sorry, it has to do with vercel.
same, did you found a way to get around it?
Hi Clinton I have tried loading it but its not loading my style sheet
I will make a new video on this, try another hosting platform.
I'm using Sql lite how to connect with that
@@divyasoni5729 Sqlite3 doesn't work on vercel.
thank you so much
You're welcome.
Hi i deployed my django project with psql as database but i get This Serverless Function has crashed error please help
I guess there something you missed in the tutorial.
Full stack features such as login or signup which uses database is not working after deployment to vercel using this method, please help
I will check it out.
@@CodeWithClinton Thanks I will be waiting.
@@CodeWithClinton did you find any solution brother?
Good Job. Please, I have created a web App using Django and react but find it difficult to deploy it.
Can you help? Thanks
You have to deploy them separately.
Ok. It means I have to separate them. Otherwise I developed them together.
Thanks@@CodeWithClinton
@@akakonin6924 it needs to be two separate apps, deployed separately.
@@CodeWithClinton Thanks, I will separate them from the local development and then see how it will be.
Please, can you help me deploy my App? Good evening Boss...
Thankyou my project got hosted but when i try to update any thing from admin panel i get error 30
How to fix Error 30 Read-only file system
I will check it out.
Everything is working for me but my media files are not displaying. What can be the reason ?
Check your settings.py file and make sure MEDIA_URL, and MEDIA_ROOT are properly configured.
make sure your MEDIA_URL and MEDIA_ROOT are properly configured.
please help
WARN! Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply.
Hey did you solve it? should i help?
@@H3A3K_ yesss please help me
It think vercel is having some issues.
@@CodeWithClinton I've tried changing everything. the lambda size the python version and more...do you have any idea what I should do
@@dagmniko the issue is from vercel, I have been trying to contact but no response yet.
I could not find the code for vercel.json file
Looked out for my comment in the comments section.
Hi, i have got an error: ./build_files.sh: line 1: pip: command not found
Could someone help me
I have been having same error message too, I think the problem is from vercel.
@@CodeWithClinton i am also getting the same error
@@JaydeepTalaviya-cl4xr Also having same problem, anybody with a solution?
my website is loading but static files are not comming
only html content is commint
Yeah, Vercel made some updates to the deployment process.
i made my project in 3.11 so it isnt working. what do i do?
While deploying stick with your current python version.
Thank you, you just saved my ass
You're welcome.
I have a doubt how to deploy django and reactis in vercel
It is easy you have to deploy them separately.
vercel cant run pip what do you think the reason might be
./build_files.sh: line 1: pip: command not found
Traceback (most recent call last):
File "/vercel/path0/manage.py", line 11, in main
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/vercel/path0/manage.py", line 22, in
main()
File "/vercel/path0/manage.py", line 13, in main
raise ImportError(
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
Error: Command "./build_files.sh" exited with 1
Vercel are currently having issues deploying python apps.
@@CodeWithClinton oh no when do you think it will be fixed
Followed your steps, but don't know why i'm getting this error.... "ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?"....and my virtual env is activated
Create a virtual environment, activate the virtual environment and make sure Django is installed in your virtual environment.
I am getting the same error, please help if you have found out any solution
thanks bro
You're welcome.
Bro im facing an error,404 not found after deployment please help me
It is a slight issue, you are trying to access a url path that doesn't exist.
i need to deploy django as an api!
It is the same process.
I cant find yhe pinned tweet
@@excelakachukwu2660 Look out for my comment in the comments section.
Bro i just dey watch this video, E be like say railway no dey work for us way dey Naija.
@@alvinchisom4841 yeah, you need a VPN to access railway from Nigeria.
@@CodeWithClinton ok Bro i will give it a try, me no like Heroku again
Clinton, please I still need your assistance
How can I help?
@@CodeWithClinton I am still not able to deploy my fullstack App. I would like to communicate with you privately so you can see my code... Thanks
is vercel free to deploy?
Yes it is.
I keep getting 404: NOT_FOUND error when i followed step by step
try changing the Root Directory
Thank you.
You definitely missing something.
I think you follow Corey Schaeffer for build this project..
No, I didn't.
I don't like my apps depending on railway they give a limited time monthly
Yeah, they give 500 hours monthly. Or you can deploy on PythonAnywhere it uses the sqlite3 database that comes with django.
@@CodeWithClinton I need a custom domain so that it's routed to my personal domain. Any other services that gives it for free?
@@gaureshp.a.8229 I don't think there is a service that gives it for free.
where are you from? I am guessing delta or benin 😂
What made you think I am from Delta or Benin? Kindly let me know. By the way, I am from Imo State.
You talk so fast 🐥
Oh wow I guess I was wrong then
broo why you didn't share the source code
I will add the source Code.
hello, this video is usefull
but i had a bug
Command "./build_files.sh" exited with 1
python version 3.11.4 and I wrote to build_files
pip install -r requirements.txt
python3.9 manage.py collectstatic
Check the terminal on vercel the exact error message should be there.
if i use db.sqlite3 only,is it still working or not?
Try and see.
"""""""raise ImproperlyConfigured("Error loading psycopg2 or psycopg module")
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 or psycopg module """" I am getting this error any fixes??
Use psycopg2-binary instead.
@@CodeWithClinton thanks it worked ☺️
@revanthsai_05 you are welcome.
404: NOT_FOUND
Code: NOT_FOUND
this error is coming
What caused the error?
The project is deployed successfully but when i going to domain giving above error
it didn't work it says "404: NOT_FOUND
Code: NOT_FOUND
ID: cdg1::vlxmf-1711096926321-ee8d97504987"
I will look into it.
Thank you so much
@@ronunkwor you are welcome.
when deploying on Vercel, i keep getting this error, how do i solve this
ModuleNotFoundError: No module named 'django'
NB: I have django installed already, in my requirements.txt file, i have Django==4.2.6
in my build_files.sh i have pip3 install -r requirements.txt
python3.9 manage.py collectstatic
and in my runtime .txt i have Python-3.9
I think Vercel is currently having issues deploying Django.
@@CodeWithClinton okay. Thank you so much