Replying to my own post... I finally realized what I was missing. Going 
back to the basics I realized I am trying this in dev with runserver 
instead of through nginx + gunicorn, so basically there was nothing serving 
the assets. It is working now.

On Monday, November 3, 2014 3:25:49 PM UTC-3, Marcela Campo wrote:
>
> Hi, I am running into some issues configuring django-pipeline. It is 
> compressing and creating the asset groups as expected when running 
> collectstatic but then I get a 404 error when trying to load them in the 
> app. I've been playing around with paths and settings and I cannot figure 
> out why.
>
> Using STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'  I get a 
> good response from python manage.py findstatic <file relative path>  but 
> still cannot load them in my webpage. These are my settings
>
> INSTALLED_APPS = (
>     'django.contrib.admin',
>     'django.contrib.auth',  
>     'django.contrib.contenttypes',
>     'django.contrib.sessions',
>     'django.contrib.messages',
>     'django.contrib.staticfiles',
>     'pipeline', 
>     'django_extensions',
>     'widget_tweaks',
>     'django.contrib.gis',
>     'django_hstore',
>     'registration',
>     'ui',
> )
>
> # Static asset configuration
> STATIC_ROOT = 'staticfiles'
> STATIC_URL = '/static/'
> STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
>
> STATICFILES_FINDERS = (
>     'pipeline.finders.FileSystemFinder',
>     'pipeline.finders.AppDirectoriesFinder',
>     'pipeline.finders.PipelineFinder',
>     'pipeline.finders.CachedFileFinder',
> )
>
>
> PIPELINE_CSS = {
>     'base': {
>         'source_filenames': (
>           'ui/css/bootstrap.min.css',
>           'ui/css/adjust.css',
>         ),
>         'output_filename': 'ui/css/myapp_base.css',
>     },
> }
>
> PIPELINE_JS = {
>     'base': {
>         'source_filenames': (
>           'ui/js/jquery-1.11.0.min.js',
>           'ui/js/js/bootstrap.min.js',
>         ),
>         'output_filename': 'ui/js/myapp_base.js',
>     }
> }
>
>
> And in my templates:
>
> {% load staticfiles %}
> {% load compressed %}
>
> {% compressed_js 'base' %}
> {% compressed_css 'base' %}
>
>
> When I run collectstatic I see under my staticfiles dir, the files 
> ui/js/myapp_base.js and ui/css/myapp_base.css are being created, calling 
> python manage.py findstatic ui/css/myapp_base.css works but I get a 404 in 
> my webapp
>
> If I use STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage' I 
> see also some extra files with random identifiers are being generated, but 
> then I get a 404 when requesting those files (including random id) and in 
> this case, findstatic also fails (if i look with the file including the 
> random id in the name)
>
> I am sure I am missing something but I just cannot figure this out. Does 
> anyone have any pointers to this one?
>
> Thanks
> Marcela
>
>
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3ccbfac0-5b61-44e8-a183-466e9e0561c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to