Issue #33 resolved

Remove static directories from the core

Anonymous created an issue

In my opinion, static directories should be removed from the core of CP2 and replaced by a utility module. Here are a few of the benifits I see: Smaller, more maintainable core. Ability to choose whether a directory should be static or dynamic at runtime. Ability to do in-place redirection on static files. Ability to apply filters to static files. I've already done a quick implementation which I'll attach in a minute.

Reported by eurleif@ecritters.biz

Comments (11)

  1. Anonymous

    Er, that got formatted wrong. Here's what I meant to say:

    In my opinion, static directories should be removed from the core of CP2 and replaced by a utility module. Here are a few of the benifits I see:

    • Smaller, more maintainable core.
    • Ability to choose whether a directory should be static or dynamic at runtime.
    • Ability to do in-place redirection on static files.
    • Ability to apply filters to static files.

    I've already done a quick implementation which I'll attach in a minute.

  2. Anonymous

    I'll stop trying if this doesn't work, but here's what I think should actually be the correct formatting:

    In my opinion, static directories should be removed from the core of CP2 and replaced by a utility module. Here are a few of the benifits I see:

    • Smaller, more maintainable core.
    • Ability to choose whether a directory should be static or dynamic at runtime.
    • Ability to do in-place redirection on static files.
    • Ability to apply filters to static files.

    I've already done a quick implementation which I'll attach in a minute.

  3. Anonymous

    Yeah, I'll probably add this to CP. But I also want to keep the current way of serving static files so there is still a trivial way of doing it.

  4. Anonymous

    Also, the core code should use a generator to return the content of the file (and do a file-stat to get the length of the file beforehand)

  5. Anonymous

    Core is now using a generator. I think that static directories in the core are fine. If you think the current configuration system for static content is too limited, open a new ticket showing what you want to do that is not possible right now.

  6. Log in to comment