Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-04 Thread A B
This problem also happens in Linux, with exactly the same symptoms. A workaround has been found! It works when the file is in the proper staticfiles folder and not inside a subdirectory. If I add "styles.css" to the directories: *STATICFILES_DIRS = [os.path.join(BASE_DIR, 'css').replace("\\",

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-04 Thread yashwanth .k
Hi, once you try with href="/static/css/styles.css"> and discard STATIC_URL completely. Check whether the css is rendered or not? If yes, then the static-files of your project are not loaded properly. If no, then it is definitely a bug in(2.2.6). Thank you. On Friday, October 4, 2019 at

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-04 Thread Jani Tiainen
Also you never put STATIC_ROOT to STATICFILES_DIRS. Because then you would with collectstatic command copy STATICFILES_DIRS to STATIC_ROOT... ke 2. lokak. 2019 klo 19.07 red sky kirjoitti: > My system: Windows 10 1903. Python 3.7.4, 64 bit. > > My directory structure: >

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-04 Thread Jani Tiainen
Hi. It seems that you have mixed some concepts here. First you rarely need to manually serve static files in development. Django takes care of that when using runserver. STATIC_ROOT is location where static files are collected when you run collectstatic management command. And that command you

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-04 Thread red sky
I think this might be a bug. It renders the static css files if I configure it as STATIC_URL = 'static/' and then change my code to href="/static/css/styles.css"> This breaks compatibility with django toolbar, though... I think this might be a bug. El jueves, 3 de octubre de 2019, 23:13:19

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-03 Thread red sky
Thank you, to Ajjet and Desh. That solution doesn't work. I keep getting the error: [03/Oct/2019 23:08:39] "GET /static/css/styles.css HTTP/1.1" 404 1767 If I request the file "manually" (http://127.0.0.1:8000/static/css/styles.css), I still get the error. El jueves, 3 de octubre de 2019,

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-02 Thread Ajeet Kumar Gupt
Hi, Use the below code href="{% static 'css/styles.css' %}" On Wed, Oct 2, 2019 at 8:06 PM red sky wrote: > My system: Windows 10 1903. Python 3.7.4, 64 bit. > > My directory structure: > %USERPROFILE%/Desktop/myproject/manage.py > %USERPROFILE%/Desktop/myproject/some_app (...) >

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-02 Thread Desh Deepak
You need to edit external css link: Solution: href="{% static 'css/styles.css' %}" Regards: Desh Deepak +917011101001 deshdeepak...@gmail.com On Wed, 2 Oct 2019, 21:37 red sky, wrote: > My system: Windows 10 1903. Python 3.7.4, 64 bit. > > My directory structure: >

Django 2.2.6 fails to serve some static files in Windows 10

2019-10-02 Thread red sky
My system: Windows 10 1903. Python 3.7.4, 64 bit. My directory structure: %USERPROFILE%/Desktop/myproject/manage.py %USERPROFILE%/Desktop/myproject/some_app (...) %USERPROFILE%/Desktop/myproject/myproject/db.sqlite3 %USERPROFILE%/Desktop/myproject/myproject/urls.py