-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find a good sourcecode viewer #2
Comments
We can just have a template tag that uses pygments to do the highlighting and does something to add linenumbers. |
Should it be frontend or backend or a combination? |
You could go for server-side where the highlighting is generated and cached upon the first request. Problem: When to clean up the cache. If you don't do caching, then server-side generation seems futile, since the client has the advantage of being much more versatile and flexible to suit user needs. |
@halfd Good question! As I see it both have pros and cons: Frontend:
Backend:
@benjaoming Doing caching on the highlighting might be a good idea. But I can foresee that it becomes quite a cache. You would have to cache every blob and diff. But maybe that's not so bad? |
Holistically, if you make the same expensive computation twice, it's a bad idea... so caching stuff like that is a really good thing. However, you can use the django cache proxy functions which allows people to have various cache backends. |
I'm beginning to think that doing the highlighting on the frontend is a better solution. Just found this: |
Cool, do you know what the numbers in the parathesis on this page mean? On 24 October 2013 20:05, valberg notifications@github.com wrote:
|
Djangit needs a good sourcecode viewer that has highlighting and linenumbers.
The text was updated successfully, but these errors were encountered: