Thanks for sorting this out Steve!

On Fri, Feb 7, 2014 at 4:54 PM, Stephen McDonald <[email protected]> wrote:

> I had django-compressor installed in my development environment which is
> one of the optional apps Mezzanine will pick up. When it's installed, it'll
> cause the current project to happily serve up uploaded files (via
> compressor's own staticfiles finder class), which made my original change
> look like it was doing the job - as reported though, that code never
> actually run.
>
> The pain of working all this out was somewhat alleviated by the hilarity
> of django-compressor and django.contrib.staticfiles being written by the
> same person.
>
> Here's the fix, I'll push a new release out later today:
>
>
> https://github.com/stephenmcd/mezzanine/commit/66b5a1089ed0ce2e615f889f35b5e39db91950ae
>
>
>
>
> On Sat, Feb 8, 2014 at 9:51 AM, Josh Cartmell <[email protected]>wrote:
>
>> Actually, scratch that, removing the try except doesn't get things
>> working, backing out the change does though.
>>
>>
>> On Fri, Feb 7, 2014 at 2:44 PM, Josh Cartmell <[email protected]>wrote:
>>
>>> Hey Steve, I'm seeing the same thing.  I've been playing around with it
>>> and the except clause in the code Sebastian referenced above is never
>>> entered even when the site 404s on a media file.
>>>
>>> Removing the try except but leaving the other changes intact causes
>>> things to start working as well as allowing media directly in the static
>>> root to be served.
>>>
>>> Looking at
>>> https://github.com/django/django/blob/master/django/contrib/staticfiles/handlers.py#L46this
>>>  makes sense because the super get_reponse (of MezzStaticFilesHandler)
>>> already catches the 404.
>>>
>>>
>>> On Thu, Feb 6, 2014 at 3:42 AM, Sebastian Clemens <
>>> [email protected]> wrote:
>>>
>>>> Now I made a local revert of
>>>>
>>>>
>>>> https://github.com/stephenmcd/mezzanine/commit/67aaae401fe47c55960236c8f3472f2d4c16e3d0
>>>>
>>>> and everything works. Don't know what happened.
>>>>
>>>> Am Donnerstag, 6. Februar 2014 12:32:30 UTC+1 schrieb Sebastian Clemens:
>>>>
>>>>> Since Stephen's changes and my last git pull, the media files won't
>>>>> served anymore on a default project. Can anyone confirm this?
>>>>>
>>>>> Am Donnerstag, 6. Februar 2014 00:02:33 UTC+1 schrieb Eduardo Rivas:
>>>>>>
>>>>>> As Stephen said, it is recommended you only use STATIC_ROOT to
>>>>>> contain files rounded up by collectstatic when deploying. The directory
>>>>>> "/static" is listed in .gitignore and .hgignore for this same reason. 
>>>>>> Just
>>>>>> in case someone is wondering what to do with files that don't belong to 
>>>>>> any
>>>>>> app, this is what I do:
>>>>>>
>>>>>>    1. Create "assets/" (or whatever you want to name it) in your
>>>>>>    project root. Dump your general purpose static resources there.
>>>>>>    2. In settings.py define STATICFILES_DIRS =
>>>>>>    (os.path.join(PROJECT_ROOT, "assets"),). This will tell Django to see
>>>>>>    "assets/" as a valid location for static files.
>>>>>>    3. Access your files in the templates. For example,
>>>>>>    "assets/style.css" will be accessed by {% static "style.css" %}.
>>>>>>
>>>>>> Just my two cents :)
>>>>>>
>>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Mezzanine Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Stephen McDonald
> http://jupo.org
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to