R
Railway15mo ago
Malay

How to connnect postgres to a djanog app?

I have already added DATABASE_URL to the environment vatiables. CMD python manage.py collectstatic --noinput && gunicorn core.wsgi:application && python manage.py migrate python manage.py migrate does not create the required tables in the connnected database.
35 Replies
Percy
Percy15mo ago
Project ID: 286dccfe-bf85-48fe-ae80-ab24c5a80716
Malay
MalayOP15mo ago
286dccfe-bf85-48fe-ae80-ab24c5a80716
Floris
Floris15mo ago
are you running the migration before initializing your service ?
Floris
Floris15mo ago
brody does not sleep
Brody
Brody15mo ago
also, migrate comes before gunicorn
Floris
Floris15mo ago
automatically? ohh in de cmd string im blind woopsie
Brody
Brody15mo ago
they need to place migrate before gunicorn, or else gunicorn runs and migrate never happens
Floris
Floris15mo ago
i oversaw that cmd nonethless made sense what i said i suppose luckily
Malay
MalayOP15mo ago
CMD python manage.py collectstatic --noinput && python manage.py migrate && gunicorn core.wsgi:application My concern is it will run every time I deploy whether I have any changes in django app models or not. Is this okay to keep the migrate command like above?
Brody
Brody15mo ago
it will run every time, but if there's no migrations to apply nothing happens and then gunicorn starts as normal
Floris
Floris15mo ago
it doesnt matter brodys too fast
Malay
MalayOP15mo ago
The above command with the change in settings suggested by @Brody worked. Thanks guys. I really appreacite your help. 🙏 🙏
Floris
Floris15mo ago
cool bro
Brody
Brody15mo ago
no problem 🙂
Malay
MalayOP15mo ago
I will share the landing page of my saas in a minute with you huys
Floris
Floris15mo ago
exciting
Malay
MalayOP15mo ago
https://skillora.io/ here is the landing page @Brody @Morpheus I will launch teh product in a week
Skillora
"Unlock Top Tech Talent: Your Fastest and Easiest Hiring Solution."
Floris
Floris15mo ago
ooh but bro this looks fire is this tailwind or bootstrap?
Malay
MalayOP15mo ago
blobyes
Floris
Floris15mo ago
i see im a tailwind virgin
Malay
MalayOP15mo ago
haha
Floris
Floris15mo ago
nah this looks really good exactly this type of setup for the first hero section you have is what i was looking for for inspiration to make a beta invite signup page for my page do u mind if i take inspiration from this
Malay
MalayOP15mo ago
Thanks I will make it better no worries
Floris
Floris15mo ago
no bro this looks good
Malay
MalayOP15mo ago
most it is written by cahtgpt kekw
Floris
Floris15mo ago
hahah if it works it works i wish gpt is great for catching errors or small code i feel like the 2 sections can use some thingy in it though im almost done with my lander, you wanna see it?
Malay
MalayOP15mo ago
sure
Floris
Floris15mo ago
Xylex.ai | Home
Pioneering algorithms, redefining financial markets.
Malay
MalayOP15mo ago
Looks great
Floris
Floris15mo ago
still has some way to go but busy on backend rn
Floris
Floris15mo ago
do you want this component?
No description
Floris
Floris15mo ago
could look great in one of ur sections to take a deeper dive in how you automate it or whatever
Malay
MalayOP15mo ago
YEs I will look into it How do I mark this solved?
Floris
Floris15mo ago
No description
Want results from more Discord servers?
Add your server