Mirco
Ronald
usually don't
I usually add the additional settings under urlpatterns stuff for MEDIA
Ronald
But normal static is fine
Sagar
I have it like W/o the if +static(settings.STATUC_URL, document.root =settings.STATIC_ROOT)
#
So could u tell me YouTube channels that u know
Sagar
Or serch django tutorial fir beginners
#
Or serch django tutorial fir beginners
I know the beginner's one, I want the advanced one
Mirco
I have it like W/o the if +static(settings.STATUC_URL, document.root =settings.STATIC_ROOT)
it's just for dev mode so u have to check if debug is true
#
Ok
Don't u have book in PDF django 2 and above?
Mirco
It is True
I know but if you don't check it before adding static() to urlpatterns , django won't know when use it or not
Ronald
Sagar
Yes
Still nothing
Sagar
Sagar
which file ?
It runs fine. But when i refresh page, i see these in console
#
I love so much this group discussion, I will participate soon
Sagar
Can i send ss
Mirco
use sharing service like imgur
Sagar
nope
200 for http 400 for both staic files
Mirco
200 for http 400 for both staic files
share settings.py, templates where you use that statics and urls.py pls
st9_8
Hello @Joshualy tell us more about your project.
Mirco
this is setting
set STATIC_ROOT as well
Sagar
https://imgur.com/a/TRN1asJ
EVIIIILL
valar dohaeries dead man
No once again dead will rise
Mirco
@pyflare
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] use this one into your settings, create the folder static in your project root and put the statics inside it then set STATIC_ROOT and STATIC_URL to '/static/'
Mirco
Ok. Thanks a lot
yw 😃
Sagar
thanks
Sagar
yeah
Sagar
Learning
Sagar
yeah, i saw
Sagar
even I did by referring the documentation
Sagar
nope. just data insertion to db
Sagar
awesome. thank you
Sagar
yw 😃
The error was the path 😅 Now it works fine. I removed all staic related codes except STATIC_URL = '/static/'
G'day to yall. I have User model and Photo model. User may have many photos, and photos may belongs to many User. Question is — am able to make a PhotoSet with some amount of photos, belonging to particular User, by not creating mediator model — this is the important
in User model
should I use it in Photo model too?
Mirco
nope
Okay, I believe this opportunity exist according to django docs. That will give me a PhotoSet I needed, but what if User will want to give a name to this set, I'm still able to store it? without creating mediator model?
Mirco
yes
set related_name into ManyToMany field
Mirco
https://www.revsys.com/tidbits/tips-using-djangos-manytomanyfield/ this one is so helpful 😃
thanks
Mirco
thanks
yw 😃
Shreehari
guys need a bit help sorry if its too noob question i have made two templates base.html and home.html. im adding all required stuffs like bootstrap in base.html and adding stuffs needed in homepage in home.html using {% extends "base.html" %} in home.html but its not extending. im not getting any errors like - file not found. heres the del.dog link of both base.html and home.html https://del.dog/ewuvizamov.htm
Shreehari
pls point if i have done anything wrong
Mirco
one before font's link
Shreehari
one before font's link
removed that still its not showing contents. if i merge both , then its working
Mirco
removed that still its not showing contents. if i merge both , then its working
did u specify a template directory into django settings ?
Shreehari
if i merge both , then its showing all the contents
Mirco
u have to define an empty block navbar inside base.html
Shreehari
ohk will try
Mirco
ohk will try
😊
Shreehari
but it shld work without defining the block ryt?
Shreehari
because we are just extending stuffs from one file to another file