collectstatic is not working

28 views
Skip to first unread message

Robin Lery

unread,
Feb 27, 2014, 8:05:40 AM2/27/14
to django...@googlegroups.com
Hello,
I have been trying to collect statics from the static folder but, its not collecting any files. But it did collect the admin files. What's wrong. Please help me.

Thank you.

settings:

import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))

STATIC_URL = '/static/'

# Template location
TEMPLATE_DIRS = (
    os.path.join(os.path.dirname(BASE_DIR), "static", "templates"),
)

if DEBUG:
    MEDIA_URL = '/media/'
    STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), "static", "static-only")
    MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), "static", "media")
    STATIC_DIRS = (
        os.path.join(os.path.dirname(BASE_DIR), "static", "static-only"),
    )

Timothy W. Cook

unread,
Feb 27, 2014, 8:07:50 AM2/27/14
to django...@googlegroups.com
I think you need to set STATICFILES_DIRS  as well




--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B4-nGrMV-y3YnSGnDVstKMu9h4f0kLH4qjSjwfQJOyGPxV5qw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
MLHIM VIP Signup: http://goo.gl/22B0U
============================================
Timothy Cook, MSc           +55 21 994711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

Robin Lery

unread,
Feb 27, 2014, 8:08:46 AM2/27/14
to django...@googlegroups.com

if DEBUG:
    MEDIA_URL = '/media/'
    STATIC_ROOT = os.path.join(os.path.dirname(
BASE_DIR), "static", "static-only")
    MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), "static", "media")
    STATIC_DIRS = (
        os.path.join(os.path.dirname(BASE_DIR), "static", "static"),
    )

Robin Lery

unread,
Feb 27, 2014, 8:12:03 AM2/27/14
to django...@googlegroups.com
ohh my god..it should be
STATICFILES_DIRS
! And not STATIC_DIRS? Thank you so much!!!
Reply all
Reply to author
Forward
0 new messages