Michal, > , it looks like somewhere, you're calling ``os.path.join(a, b)``, where the second argument starts with a slash
I've tried it both ways. The way I got findstatic to work was by taking off the leading slash, but so far I haven't figured out how to make that work so that the files are called. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'essell', 'csvimport2', 'debug_toolbar', 'account', ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', ) STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATIC_URL = '/static/' # Extra places for collectstatic to find static files. STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static'), os.path.join(BASE_DIR, 'static/bootstrap'), os.path.join(BASE_DIR, 'static/bootstrap/css/'), os.path.join(BASE_DIR, 'static/bootstrap/fonts/'), os.path.join(BASE_DIR, 'static/bootstrap/js/'), os.path.join(BASE_DIR, 'static/css/'), os.path.join(BASE_DIR, 'static/email_templates/'), os.path.join(BASE_DIR, 'static/fonts/'), os.path.join(BASE_DIR, 'static/images/'), os.path.join(BASE_DIR, 'static/js/'), os.path.join(BASE_DIR, 'static/less/'), os.path.join(BASE_DIR, 'static/plugins/'), os.path.join(BASE_DIR, 'static/videos/'), ] # Simplified static file serving. # https://warehouse.python.org/project/whitenoise/ STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' On Tue, Jul 12, 2016 at 3:03 AM, Michal Petrucha < michal.petru...@koniiiik.org> wrote: > On Tue, Jul 12, 2016 at 12:40:11AM -0700, Malik Rumi wrote: > > UPDATE: > > > > I got it back to where runserver comes up and I get no errors, but the > > staticfiles are still not being served. > > > > > > The paths are in the right *format* to satisfy the STATICFILES_DIR in > > SETTINGS, and so that they can be *found*, according to debug toolbar, > and > > they *pass* the checks in runserver, collectstatic, and findstatic, but > not > > so they can be *used*. > > > > > > I have to assume that safe_join is still running around somewhere in the > > background, even though it is now failing silently. > > > > > > I need to make safe join see these paths the same way it saw the single > > file bootstrap.css when it passed findstatic, but I don't know how to do > > that. > > > > > > One could ask why I get all those 404's from runserver, but I think > that's > > explained by the fact that safe_join is still blocking them. > > > > Ideas? > > Could you please post all the settings that are in any way related to > static files in full? That means things like STATICFILES_*, and > everything that's used in those (like BASE_DIR, etc). Please, don't > leave any part of them out. If you are not certain, just post the > entire settings module, only remove secret values. > > Also, could you provide the exact URL of a request that is resulting > in a SuspiciousFileOperation, including a full traceback? > > Based on the error message you posted in the initial post, it looks > like somewhere, you're calling ``os.path.join(a, b)``, where the > second argument starts with a slash – that might be the reason, but > it's hard to tell whether this is the case, because you haven't shown > us the full settings. > > Cheers, > > Michal > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/MoWUYN4SJmk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > 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/20160712100323.GK22177%40koniiiik.org > . > For more options, visit https://groups.google.com/d/optout. > -- "Every time you see a black kid wearing a hoodie, you say: There's a thug. If you see a white kid wearing hoodie, you say: There's Mark Zuckerberg," Jones told USA TODAY <http://www.usatoday.com/story/tech/2015/01/19/van-jones-yes-we-code-diversity-technology/21889543/> last year. "I said, 'That's because of racism. And Prince said, 'Maybe so, *or maybe you civil rights guys haven't created enough Mark Zuckerbergs.' "* -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/CAKd6oBz5%3D54LzeneVmE%3DZ16WjWo4F7P4f-FFgW2efHi5ob6yXQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.