Anonymous avatar Anonymous committed a3a76e7

cache newsfeeds

Comments (0)

Files changed (3)


 from newsmeme.extensions import db, mail, oid, cache
 DEBUG = True
-SECRET_KEY = "38061032-5b21-4c20-b67b-28d891c6a1dc"
+# change this in your production settings !!!
+SECRET_KEY = "secret"
 # keys for localhost. Change as appropriate.


 def search():
     keywords = request.args.get("keywords", "")


 from werkzeug.contrib.atom import AtomFeed
 from newsmeme.models import User, Post, Tag
+from newsmeme.helpers import cached
 feeds = Module(__name__)
 def index():
     feed = PostFeed("newsmeme - hot",
 def latest():
     feed = PostFeed("newsmeme - new",
 def deadpool():
     feed = PostFeed("newsmeme - deadpool",
 def tag(slug):
     tag = Tag.query.filter_by(slug=slug).first_or_404()
 def user(username):
     user = User.query.filter_by(username=username).first_or_404()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.