TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Django-medusa: Rendering Django sites as static HTML

45 点作者 mtigas将近 13 年前

5 条评论

natrius将近 13 年前
<i>"The process that actually generates the output simply uses (or abuses) Django’s internal testclient to request each URL and store the resulting data"</i><p>It warms my heart to see another example of test client abuse. We used the test client to implement a pure Python ESI processor[1]. We ran it in production for awhile, but no one should ever do that. Varnish is the answer. The code was still running on our development machines when I left.<p>[1] <a href="https://github.com/armstrong/armstrong.esi/" rel="nofollow">https://github.com/armstrong/armstrong.esi/</a>
ashray将近 13 年前
I just don't see the point to this kind of stuff.. =/<p>For high traffic apps, Varnish is the answer as you don't hit the application layer.<p>If you think that's too complicated, try nginx-memcached - also an excellent solution.<p>If not that, try django's template caching with memcached - also extremely fast but will hit the application layer.<p>If you're in some shared hosting environment (you probably are too small still to warrant this kind of aggressive caching on static assets - but hey, efficiency never hurt anybody :P) without access to memcached, use django's cache backend with a file based cache. It's almost 100% as what this does and you don't have any additional overhead.<p>Beats me why people are re-inventing the wheel - or am I missing something ?
评论 #4183252 未加载
评论 #4183069 未加载
评论 #4182933 未加载
评论 #4182972 未加载
bifrost将近 13 年前
Thats kinda neat, I suspect this will be used a lot. I did something similar to this 5-6 years ago with wget but this is a lot more elegant IMHO.
评论 #4182649 未加载
55pts将近 13 年前
Very cool project, thanks for open sourcing it. I was looking for this type of library this week and found medusa and aymcms.<p>Does it handle images? How about multiple sites/subdomains?
评论 #4183661 未加载
megaman821将近 13 年前
Why all these static site generators? Just use Varnish, it is the static site generator for any and all frameworks.
评论 #4182865 未加载
评论 #4183268 未加载