Skip to content

Commit 078bff5

Browse files
authored
Merge pull request #6800 from AndrewVSutherland/charmodbrowse
Resolves #6680
2 parents 6f55446 + 5645c51 commit 078bff5

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

lmfdb/characters/main.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
WebSmallDirichletGroup,
2323
WebDBDirichletOrbit
2424
)
25-
from lmfdb.characters.ListCharacters import get_character_modulus
2625
from lmfdb.characters import characters_page
2726
from lmfdb import db
2827

@@ -312,24 +311,6 @@ def dirichlet_character_search(info, query):
312311
@characters_page.route("/Dirichlet")
313312
@characters_page.route("/Dirichlet/")
314313
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-
333314
if request.args:
334315
# hidden_search_type for prev/next buttons
335316
info = to_dict(request.args, search_array=DirichSearchArray())

lmfdb/characters/templates/CharacterNavigate.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h2> Browse </h2>
1212
<table class="browse">
1313
<tr>
1414
<td>By {{ KNOWL('character.dirichlet.modulus', title="modulus") }}:</td>
15-
<td>{% for rnge in info.modulus_list %} <a href="?modbrowse={{rnge}}">{{rnge}}</a>&nbsp;&nbsp; {% endfor %} $\cdots$</td>
15+
<td>{% for rnge in info.modulus_list %} <a href="?modulus={{rnge}}">{{rnge}}</a>&nbsp;&nbsp; {% endfor %} $\cdots$</td>
1616
</tr><tr>
1717
<td>By {{ KNOWL('character.dirichlet.conductor', title="conductor") }}:</td>
1818
<td>{% for rnge in info.conductor_list %} <a href="?conductor={{rnge}}">{{rnge}}</a>&nbsp;&nbsp; {% endfor %} $\cdots$</td>

lmfdb/characters/test_characters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def test_even_odd(self):
3131
assert '>%s</t' % (parity_string(-1)) in W.get_data(as_text=True)
3232

3333
def test_modbrowse(self):
34-
W = self.tc.get('/Character/Dirichlet/?modbrowse=41-60')
35-
assert 'Dirichlet/45/11' in W.get_data(as_text=True)
34+
W = self.tc.get('/Character/Dirichlet/?modulus=41-60')
35+
assert '46.d' in W.get_data(as_text=True)
3636

3737
def test_search(self):
3838
W = self.tc.get('/Character/Dirichlet/?conductor=15&order=4')

0 commit comments

Comments
 (0)