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.

Reply via email to