STATIC FILE

18 views
Skip to first unread message

Mh Raffi

unread,
Nov 9, 2022, 10:28:17 AM11/9/22
to django...@googlegroups.com
Hi,
I run cmd to collect static files but files are stored in c:\ but not in the actual project folder.
My project folder is on the desktop. 
while running the command am into that root folder of the project.
and i have images that are also not stored. I have an app in railway host and debug in a false  mode.
I tried the option of white noise and it was still the same.
Can anyone let me know where I am missing?


Thanks & Regards
Mohammed Raffi.J


Lakshyaraj Dash

unread,
Nov 9, 2022, 10:37:03 AM11/9/22
to django...@googlegroups.com
Set the STATIC_ROOT conf as follows
import os # ignore if once imported
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

Also see of you've allowed that particular host.

Thanks and Regards
Lakshyaraj Dash

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKfPRhVnz55d%2B%3Dw2N5Q2pJwj96ksnOWFO0njWPExGwNrzA6mMA%40mail.gmail.com.

ritik sahoo

unread,
Nov 9, 2022, 10:20:46 PM11/9/22
to django...@googlegroups.com
You must import media url

Mh Raffi

unread,
Nov 9, 2022, 10:24:36 PM11/9/22
to django...@googlegroups.com
I have that configuration setup. 

Images are not loading and collect static is collecting in c drive but my project is in desktop. 

Mh Raffi

unread,
Nov 9, 2022, 10:26:03 PM11/9/22
to django...@googlegroups.com
Media url in settings I have. 

On Thu, Nov 10, 2022, 8:50 AM ritik sahoo <ritiks...@gmail.com> wrote:

Chukwudi Onwusa

unread,
Nov 10, 2022, 2:44:18 AM11/10/22
to django...@googlegroups.com
I think you should make your work more organized, iff I truly understand you, by putting your static directory inside your working directory.

Reply all
Reply to author
Forward
0 new messages