Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate

Commit 75ae817085830d8f5df2eecfe635668c602f959a

UX Improvement: Remember last page browsed
app/app.py
(9 / 2)
  
3737
3838""" Initialization of local app """
3939app = Flask(__name__)
40#app.debug = True
40app.debug = True
4141app.secret_key="ilovesugar"
4242babel = Babel(app)
4343
159159 Context Grid
160160 """
161161 try:
162 page=int(request.args['page'])
163 session['page']=page
164 except KeyError:
165 return redirect(url_for('context_grid',
166 query=query, page=session.get('page',1)))
167 #page=session.get('page', 1)
168
169 try:
162170 terms = session['tags'][:]
163171 except KeyError:
164172 terms = []
180180
181181 _PAGE_SIZE = 6
182182 r = []
183 page = int(request.args.get('page', 1))
184183
185184 result = client.Context.find(full_query, reply=['guid', 'title', 'vote'])
186185 offset = _PAGE_SIZE * (page - 1)