Re: setting up Django Compressor

2012-09-05 Thread Phil
Hi Joni,

Yes I have 'compressor.finders.CompressorFinder' added. All the 
requirements are installed too I double checked them all, tried installing 
them all individually and it said they were all installed already. When I 
first setup the site it was using django1.3, but recently upgraded it. 

My static url setting is

STATIC_URL = '/media/'

and media is(for local setup)...

MEDIA_URL = 'http://127.0.0.1:8080/media/'

Not sure what's going on, might just try another compressor at this stage 
as I am not having any joy with this one.



On Sunday, September 2, 2012 3:38:27 PM UTC+1, Joni Bekenstein wrote:
>
> Just to cover the basics, did you follow all installation steps described 
> here:
> http://django_compressor.readthedocs.org/en/latest/quickstart/#installation
>
> Mainly adding 'compressor.finders.CompressorFinder' to STATICFILES_FINDERS
>
>
> Another thing kind of odd is that your css URL starts with /media/. Whats 
> your STATIC_URL and MEDIA_URL setting? Check this out: 
> http://django_compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_URL
>
> It looks like its defaulting to MEDIA_URL, but you said you were using 
> Django 1.4, which should have STATIC_URL available.
>
>
> On Sunday, September 2, 2012 11:13:53 AM UTC-3, Phil wrote:
>>
>> Hi Joni,
>>
>> Thanks a million for reply.
>>
>> Yes I am using django runserver, its a working site just trying to get 
>> compressor working locally before moving to production. My css works fine 
>> without the compressor app. I can't see the file if I copy it in my url I 
>> get a 500 error and the "CACHE" folder doesn't seem to exist anywhere. I 
>> didn't have anything in my "urls.py" for media, but I added the following 
>> to see if it would help but it still didn't work...
>>
>> ***
>> if settings.DEBUG:
>> urlpatterns = patterns('',
>> url(r'^media/(?P.*)$', 'django.views.static.serve',
>> {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
>> url(r'', include('django.contrib.staticfiles.urls')),
>> ) + urlpatterns
>> ***
>>
>>
>>
>> On Saturday, September 1, 2012 3:09:42 PM UTC+1, Joni Bekenstein wrote:
>>>
>>> The generated css file seems to be in your media directory. If you copy 
>>> that URL, can you see the css file? Are you using Django's dev server 
>>> (runserver)? If so, did you add to your urls.py a view to serve the media 
>>> files? (and that view should only exist when DEBUG is true since in 
>>> production you're probably going to serve static files and media files 
>>> directly with your webserver)
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/bfE-bHAJpOkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: setting up Django Compressor

2012-09-02 Thread Joni Bekenstein
Just to cover the basics, did you follow all installation steps described 
here:
http://django_compressor.readthedocs.org/en/latest/quickstart/#installation

Mainly adding 'compressor.finders.CompressorFinder' to STATICFILES_FINDERS


Another thing kind of odd is that your css URL starts with /media/. Whats 
your STATIC_URL and MEDIA_URL setting? Check this 
out: 
http://django_compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_URL

It looks like its defaulting to MEDIA_URL, but you said you were using 
Django 1.4, which should have STATIC_URL available.


On Sunday, September 2, 2012 11:13:53 AM UTC-3, Phil wrote:
>
> Hi Joni,
>
> Thanks a million for reply.
>
> Yes I am using django runserver, its a working site just trying to get 
> compressor working locally before moving to production. My css works fine 
> without the compressor app. I can't see the file if I copy it in my url I 
> get a 500 error and the "CACHE" folder doesn't seem to exist anywhere. I 
> didn't have anything in my "urls.py" for media, but I added the following 
> to see if it would help but it still didn't work...
>
> ***
> if settings.DEBUG:
> urlpatterns = patterns('',
> url(r'^media/(?P.*)$', 'django.views.static.serve',
> {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
> url(r'', include('django.contrib.staticfiles.urls')),
> ) + urlpatterns
> ***
>
>
>
> On Saturday, September 1, 2012 3:09:42 PM UTC+1, Joni Bekenstein wrote:
>>
>> The generated css file seems to be in your media directory. If you copy 
>> that URL, can you see the css file? Are you using Django's dev server 
>> (runserver)? If so, did you add to your urls.py a view to serve the media 
>> files? (and that view should only exist when DEBUG is true since in 
>> production you're probably going to serve static files and media files 
>> directly with your webserver)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/0iBQbggGm8UJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: setting up Django Compressor

2012-09-02 Thread Phil
Hi Joni,

Thanks a million for reply.

Yes I am using django runserver, its a working site just trying to get 
compressor working locally before moving to production. My css works fine 
without the compressor app. I can't see the file if I copy it in my url I 
get a 500 error and the "CACHE" folder doesn't seem to exist anywhere. I 
didn't have anything in my "urls.py" for media, but I added the following 
to see if it would help but it still didn't work...

***
if settings.DEBUG:
urlpatterns = patterns('',
url(r'^media/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
url(r'', include('django.contrib.staticfiles.urls')),
) + urlpatterns
***



On Saturday, September 1, 2012 3:09:42 PM UTC+1, Joni Bekenstein wrote:
>
> The generated css file seems to be in your media directory. If you copy 
> that URL, can you see the css file? Are you using Django's dev server 
> (runserver)? If so, did you add to your urls.py a view to serve the media 
> files? (and that view should only exist when DEBUG is true since in 
> production you're probably going to serve static files and media files 
> directly with your webserver)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/2QOYzFLa-f0J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



setting up Django Compressor

2012-09-01 Thread Joni Bekenstein
The generated css file seems to be in your media directory. If you copy that 
URL, can you see the css file? Are you using Django's dev server (runserver)? 
If so, did you add to your urls.py a view to serve the media files? (and that 
view should only exist when DEBUG is true since in production you're probably 
going to serve static files and media files directly with your webserver)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/jHs112LcrVAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



setting up Django Compressor

2012-08-31 Thread Phil
Hi,

Django1.4, Python2.7

I am currently trying to get django compressor to work locally, I installed 
django_compressor via pip install earlier, added it to my installed apps. 
Here is a copy of my base template


{% load i18n %}
{% load compress %}





  



{% compress css %}

{% endcompress %}
.



When I view the source it outputs the following

**

  http://127.0.0.1:8080/media/CACHE/css/fbe3d01c9f33.css>" 
type="text/css" media="all" />


**


So it is creating the cached css file, but it doesn't seem to be able to 
find it(ie page loads with no style applied to it), any ideas what it could 
be that I am missing?


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/qpwRn4wDPycJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.