Repository: LMFDB/lmfdb

Issue:
Kloosterman sum compute button on Dirichlet characters not working
If you go to a Dirichlet character page, e.g. http://www.lmfdb.org/Character/Dirichlet/7/3 and enter a pair of numbers in the Kloosterman sum box (e.g. 1,2) and click the compute button nothing happens.  The compute buttons for Gauss and Jacobi sums do seem to work, and the slider for Kloosterman sums does work (but also see #71).


Discussion:
PR #2468 fixes this.  However there is more discussion at #71 suggesting that (1) the sliders are unnecessary and (2) we should display the default values when the page loads.  Hence I will keep this issue open even though I will merge #2468 on the grounds that having something working beats it not working, while we decide.
Yes, I was just figuring out how to display default values. (I'm still a javascript neophyte, but I think this is fine).

I haven't removed the sliders. I was unsure whether opinions have changed on their utility. But if we do want to remove them, I know how.
I vote that we remove them, I don't think they add any particular value and make the U/I different from the rest of the LMFDB.  If you want to go ahead and add this to your outstanding PR (or a new PR if you prefer), I will review it and then we can close both this issue and #71.
Ok. I've updated my PR to remove the sliders as well.
@davidlowryduda, I am reopening this issue, as the character sums are not being hidden for very large modulus characters as they should be, see

http://www.lmfdb.org/Character/Dirichlet/19265902/13392695

for example.
@AndrewVSutherland Ok! I'll take a look at this today.

Resolving patch:
diff --git a/lmfdb/WebCharacter.py b/lmfdb/WebCharacter.py
--- a/lmfdb/WebCharacter.py
+++ b/lmfdb/WebCharacter.py
@@ -789,7 +789,11 @@ def genvalues(self):  return None
     @property
     def indlabel(self):  return None
     def value(self, *args): return None
-    def charsums(self, *args): return False
+
+    @property
+    def charsums(self, *args):
+        return False
+
     def gauss_sum(self, *args): return None
     def jacobi_sum(self, *args): return None
     def kloosterman_sum(self, *args): return None
diff --git a/lmfdb/characters/main.py b/lmfdb/characters/main.py
--- a/lmfdb/characters/main.py
+++ b/lmfdb/characters/main.py
@@ -44,7 +44,7 @@ def render_characterNavigation():
 
 def render_DirichletNavigation():
     args = to_dict(request.args)
-    
+
     info = {'args':args}
     info['bread'] = [ ('Characters',url_for(".render_characterNavigation")),
                       ('Dirichlet', url_for(".render_Dirichletwebpage")) ]
@@ -180,14 +180,14 @@ def render_Dirichletwebpage(modulus=None, number=None):
         flash_error ("specified modulus %s is too large, it should be less than $10^{20}$.", modulus)
         return redirect(url_for(".render_Dirichletwebpage"))
 
-        
-    
+
+
     if number == None:
         if modulus < 100000:
             info = WebDirichletGroup(**args).to_dict()
         else:
             info = WebSmallDirichletGroup(**args).to_dict()
-        info['title'] = 'Group of Dirichlet Characters of Modulus ' + str(modulus) 
+        info['title'] = 'Group of Dirichlet Characters of Modulus ' + str(modulus)
         info['bread'] = [('Characters', url_for(".render_characterNavigation")),
                          ('Dirichlet', url_for(".render_Dirichletwebpage")),
                          ('%d'%modulus, url_for(".render_Dirichletwebpage", modulus=modulus))]


Test patch: