Re: 404 Page for /static/*
- From:
- Ry4an Brase
- Date:
- 2011-04-30 @ 21:07
I figured it out -- flask is nice.
https://bitbucket.org/Ry4an/blohg/changeset/4da566ff0176
or pull from the repo at:
https://bitbucket.org/Ry4an/blohg
On Sat, Apr 30, 2011 at 03:33:50PM -0500, Ry4an Brase wrote:
> I just did the 0.3 update for blohg, and it went smoothly.
> Thanks for keeping we early adopters in mind.
>
> Is there a recommended way to do things like attached images? I've been
> stuffing them into /static/ but it feels a little odd having them
> outside of the /content/ directory when they're really content.
>
> Example:
>
> http://ry4an.org/unblog/static/attachments/demo-security-groups.png
>
> http://ry4an.org/unblog/source/post/ec2_security_group_tools/
>
> Also, when there's a file-not-found inside the /static/* URL space one
> gets a 500 ISE not a 404. I don't really care if /static/* yields my
> nice, template-using 404 page (it'd be nice, though), but at least
> setting the status code would be nice.
>
> I've been looking to do it myself, but I'm bogging down in
> mercurial_theme.py's setup_theme/send_static_file_from_mercurial
> delegation. The IOError for the file-not-found shows up in
> send_static_file_from_mercurial and I don't know if it's better to
> try/except it there and generate the 404 in place or if there's a way to
> have the setup_theme/add_url_rule catch the exception and let the
> request move on for higher-level delegation. Thoughts?
>
> Thanks again for a great blogging system!
>
> --
> Ry4an Brase - http://ry4an.org/
Re: [blohg] Re: 404 Page for /static/*
- From:
- Rafael Martins
- Date:
- 2011-04-30 @ 21:33
On Sat, Apr 30, 2011 at 6:07 PM, Ry4an Brase <ry4an-blohg@ry4an.org> wrote:
> I figured it out -- flask is nice.
>
> https://bitbucket.org/Ry4an/blohg/changeset/4da566ff0176
>
> or pull from the repo at:
>
> https://bitbucket.org/Ry4an/blohg
>
Pulled, thanks!
I'll try to figure out how to add an attachments directory to the
content directory without break things. Will reply here when done.
Thanks again, Ry4an
--
Rafael Goncalves Martins
http://rafaelmartins.eng.br/
Re: [blohg] 404 Page for /static/*
- From:
- Rafael Martins
- Date:
- 2011-05-01 @ 22:20
On Sat, Apr 30, 2011 at 5:33 PM, Ry4an Brase <ry4an-blohg@ry4an.org> wrote:
> I just did the 0.3 update for blohg, and it went smoothly.
> Thanks for keeping we early adopters in mind.
>
> Is there a recommended way to do things like attached images? I've been
> stuffing them into /static/ but it feels a little odd having them
> outside of the /content/ directory when they're really content.
>
> Example:
>
> http://ry4an.org/unblog/static/attachments/demo-security-groups.png
>
> http://ry4an.org/unblog/source/post/ec2_security_group_tools/
>
I just finished implementing some decent support to attachments. A new
release will follow shortly.
Documentation about this feature is here:
http://docs.blohg.org/write/#adding-attachments
Thanks!
--
Rafael Goncalves Martins
http://rafaelmartins.eng.br/