Do you define BASE_DIR and STATIC_URL in your settings.py file ? 2016-07-11 23:56 GMT+02:00 Malik Rumi <[email protected]>: > Well, I'm stuck again. I am still trying to get my dev site to work with > this new bootstrap theme. Debug toolbar is telling me over 1,000 staticfiles > have been found, but none were used. So if they are found, why aren't they > used? I ran findstatic and got this traceback: > >> (cannon)malikarumi@Tetuoan2:~/Projects/cannon/jamf$ python manage.py >> findstatic /static/bootstrap/css/bootstrap.css >> Traceback (most recent call last): >> <snip> >> File >> "/home/malikarumi/Projects/cannon/local/lib/python2.7/site-packages/django/utils/_os.py", >> line 78, in safe_join >> 'component ({})'.format(final_path, base_path)) >> django.core.exceptions.SuspiciousFileOperation: The joined path >> (/static/bootstrap/css/bootstrap.css) is located outside of the base path >> component (/home/malikarumi/Projects/cannon/jamf/static) >> (cannon)malikarumi@Tetuoan2:~/Projects/cannon/jamf$ > > > > So I took '/static' off the front of the path, because in my settings I > have: > >> STATICFILES_DIRS = [ >> os.path.join(BASE_DIR, 'static'), > > > and I thought perhaps that was causing a problem, but it made no difference: > > django.core.exceptions.SuspiciousFileOperation: The joined path > (/bootstrap/css/bootstrap.css) is located outside of the base path component > (/home/malikarumi/Projects/cannon/jamf/static) > > > Then, following > https://docs.djangoproject.com/en/1.9/ref/settings/#staticfiles-dirs, I made > a list of all the paths with bootstrap stuff in them, but then I got a new > error: > >> File >> "/home/malikarumi/Projects/cannon/local/lib/python2.7/site-packages/django/core/files/storage.py", >> line 299, in listdir >> for entry in os.listdir(path): >> OSError: [Errno 2] No such file or directory: >> '/home/Projects/cannon/jamf/static/bootstrap' > > > Note, the string in STATICFILES_DIRS does have the slash after bootstrap, > but that seems to make no difference: > > '/home/Projects/cannon/jamf/static/bootstrap/', > > > Finally, taking yet another look at the docs, I took the os.dir line out and > made it another path in the list, but still that made no difference: > >> File >> "/home/malikarumi/Projects/cannon/local/lib/python2.7/site-packages/django/core/files/storage.py", >> line 299, in listdir >> for entry in os.listdir(path): >> OSError: [Errno 2] No such file or directory: >> '/home/Projects/cannon/jamf/static' > > > > Need I also say the directory does in fact exist? What's going on here? > Thanks. > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/4ca8a3ac-9646-4b30-b950-20ac0402f8c5%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout.
-- Cordialement, Coues Ludovic +336 148 743 42 -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEuG%2BTbRGANO6xMzoqO2nuGKLQieoobz4%3D6mX5rciNUoRm5kCA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

