开发者

Is there a statics finder for django that will find statics in eggs?

I know there is no finder built into django for this (at least not in 1.3) but I am wondering if someone out there 开发者_JS百科has made one yet before I make an attempt at it.

Basically what I am looking for is a statics finder that will look in apps that are installed as an egg file only that contains a static dir in the egg.

I have looked at the code for django.contrib.staticfiles.finders.AppDirectoriesFinder and unfortunately in the Django 1.3 version of it the only thing that is checked is subdirectories of an installed app location, but not subdirectories in eggs.

UPDATE: Since there are no replies yet I will take that as a "no". :) If I get some time I may just put one together myself but it doesn't look like there is much interest. I don't know if this is appropriate or not but if you do happen to be interested in a statics finder for eggs, maybe just leave a comment.


It's a little hackish but this let me use STATICFILES_DIRS and the FileSystemFinder.

def inplaceeditform_path():
    import inplaceeditform
    return os.path.abspath(os.path.join(os.path.dirname(inplaceeditform.__file__),'media'))

STATICFILES_DIRS = (
   ('site/inplaceeditform' ,inplaceeditform_path()),
)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜