R
Railway14mo 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
Percy14mo ago
Project ID: 286dccfe-bf85-48fe-ae80-ab24c5a80716
Malay
Malay14mo ago
286dccfe-bf85-48fe-ae80-ab24c5a80716
Floris
Floris14mo ago
are you running the migration before initializing your service ?
Floris
Floris14mo ago
brody does not sleep
Brody
Brody14mo ago
also, migrate comes before gunicorn
Floris
Floris14mo ago
automatically? ohh in de cmd string im blind woopsie
Brody
Brody14mo ago
they need to place migrate before gunicorn, or else gunicorn runs and migrate never happens
Floris
Floris14mo ago
i oversaw that cmd nonethless made sense what i said i suppose luckily
Malay
Malay14mo 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
Brody14mo ago
it will run every time, but if there's no migrations to apply nothing happens and then gunicorn starts as normal
Floris
Floris14mo ago
it doesnt matter brodys too fast
Malay
Malay14mo ago
The above command with the change in settings suggested by @Brody worked. Thanks guys. I really appreacite your help. 🙏 🙏
Floris
Floris14mo ago
cool bro
Brody
Brody14mo ago
no problem 🙂
Malay
Malay14mo ago
I will share the landing page of my saas in a minute with you huys
Floris
Floris14mo ago
exciting
Malay
Malay14mo 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
Floris14mo ago
ooh but bro this looks fire is this tailwind or bootstrap?
Malay
Malay14mo ago
blobyes
Floris
Floris14mo ago
i see im a tailwind virgin
Malay
Malay14mo ago
haha
Floris
Floris14mo 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
Malay14mo ago
Thanks I will make it better no worries
Floris
Floris14mo ago
no bro this looks good
Malay
Malay14mo ago
most it is written by cahtgpt kekw
Floris
Floris14mo 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
Malay14mo ago
sure
Floris
Floris14mo ago
Xylex.ai | Home
Pioneering algorithms, redefining financial markets.
Malay
Malay14mo ago
Looks great
Floris
Floris14mo ago
still has some way to go but busy on backend rn
Floris
Floris14mo ago
do you want this component?
No description
Floris
Floris14mo ago
could look great in one of ur sections to take a deeper dive in how you automate it or whatever
Malay
Malay14mo ago
YEs I will look into it How do I mark this solved?
Floris
Floris14mo ago
No description
Want results from more Discord servers?
Add your server