why style.css is not read by my codes. i am using VScode for Django

28 views
Skip to first unread message

alka reetesh

unread,
Aug 24, 2020, 12:20:03 PM8/24/20
to Django users
I have used python manage.py collectstatic, which gave error--FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\dmform\myproject\statics'

Shivansh Sen

unread,
Aug 24, 2020, 12:25:29 PM8/24/20
to django...@googlegroups.com
Try replace \ with \\

Shivansh Sen
India

On Mon, Aug 24, 2020, 21:49 alka reetesh <alkare...@gmail.com> wrote:
I have used python manage.py collectstatic, which gave error--FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\dmform\myproject\statics'

--
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/0dd03bb0-3c6c-4e7f-b7d7-9f6f55aae7bbn%40googlegroups.com.

Amresh Giri

unread,
Aug 24, 2020, 12:27:49 PM8/24/20
to django...@googlegroups.com
Is is supposed to be "statics" ?

On Mon, Aug 24, 2020, 9:49 PM alka reetesh <alkare...@gmail.com> wrote:
I have used python manage.py collectstatic, which gave error--FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\dmform\myproject\statics'

--

Haris Ahmad

unread,
Aug 24, 2020, 12:33:41 PM8/24/20
to django...@googlegroups.com
Have you added whitenoise to the settings.py

RANGA BHARATH JINKA

unread,
Aug 25, 2020, 1:46:36 AM8/25/20
to django...@googlegroups.com
Hi,

   I think it is not able to find the file. Please check whether it is the correct location of the files.
  Add a static root in settings file like 
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

STATIC_URL = '/static/'

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'static')
]

MEDIA_URL = '/images/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'static/images')

All the best



--
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

Kenedi Novriansyah

unread,
Aug 25, 2020, 4:51:04 AM8/25/20
to django...@googlegroups.com
test this STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
url.py
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)


Reply all
Reply to author
Forward
0 new messages