On 11.08.2011, at 12:00, Jonathan Slenders wrote:
> Also a utility function in staticfiles for reading the actual content
> on the server side, giving a relative path would be nice if such one
> does not yet exist.
> e.g.
>
> from staticfiles.utils import staticfile_open
> filepointer = staticfile_open('my-relative-path...')
In the patch I've added a staticfiles_storage attribute to the
django.contrib.staticfiles.storage module which you can use to do that,
e.g.::
from django.contrib.staticfiles.storage import staticfiles_storage
filepointer = staticfiles_storage.open('my-relative-path')
Jannis
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.