|
6 | 6 | from lmfdb.utils import ( |
7 | 7 | to_dict, flash_error, SearchArray, YesNoBox, display_knowl, ParityBox, |
8 | 8 | TextBox, CountBox, parse_bool, parse_ints, search_wrap, raw_typeset_poly, |
9 | | - StatsDisplay, totaler, proportioners, comma, flash_warning, Downloader) |
| 9 | + StatsDisplay, totaler, proportioners, comma, flash_warning, Downloader, redirect_no_cache) |
10 | 10 | from lmfdb.utils.interesting import interesting_knowls |
11 | 11 | from lmfdb.utils.search_parsing import parse_range3 |
12 | 12 | from lmfdb.utils.search_columns import SearchColumns, MathCol, LinkCol, CheckCol, ProcessedCol, MultiProcessedCol |
|
22 | 22 | WebSmallDirichletGroup, |
23 | 23 | WebDBDirichletOrbit |
24 | 24 | ) |
25 | | -from lmfdb.characters.ListCharacters import get_character_modulus |
26 | 25 | from lmfdb.characters import characters_page |
27 | 26 | from lmfdb import db |
28 | 27 |
|
@@ -312,24 +311,6 @@ def dirichlet_character_search(info, query): |
312 | 311 | @characters_page.route("/Dirichlet") |
313 | 312 | @characters_page.route("/Dirichlet/") |
314 | 313 | def render_DirichletNavigation(): |
315 | | - try: |
316 | | - if 'modbrowse' in request.args: |
317 | | - arg = request.args['modbrowse'] |
318 | | - arg = arg.split('-') |
319 | | - modulus_start = int(arg[0]) |
320 | | - modulus_end = int(arg[1]) |
321 | | - info = {'args': request.args} |
322 | | - info['title'] = 'Dirichlet characters of modulus ' + str(modulus_start) + '-' + str(modulus_end) |
323 | | - info['bread'] = bread('Modulus') |
324 | | - info['learnmore'] = learn() |
325 | | - headers, entries, rows, cols = get_character_modulus(modulus_start, modulus_end, limit=8) |
326 | | - info['entries'] = entries |
327 | | - info['rows'] = list(range(modulus_start, modulus_end + 1)) |
328 | | - info['cols'] = sorted({r[1] for r in entries}) |
329 | | - return render_template("ModulusList.html", **info) |
330 | | - except (ValueError, IndexError) as err: |
331 | | - flash_error("Error raised in parsing: %s", err) |
332 | | - |
333 | 314 | if request.args: |
334 | 315 | # hidden_search_type for prev/next buttons |
335 | 316 | info = to_dict(request.args, search_array=DirichSearchArray()) |
@@ -640,8 +621,9 @@ def ctx_dirchar(): |
640 | 621 |
|
641 | 622 |
|
642 | 623 | @characters_page.route('/Dirichlet/random') |
| 624 | +@redirect_no_cache |
643 | 625 | def random_Dirichletwebpage(): |
644 | | - return redirect(url_for('.render_DirichletNavigation', search_type="Random")) |
| 626 | + return url_for('.render_DirichletNavigation', search_type="Random") |
645 | 627 |
|
646 | 628 |
|
647 | 629 | @characters_page.route('/Dirichlet/interesting') |
|
0 commit comments