• 
      

    Trophies for Prime numbers

    Review Request #3639 — Created Dec. 8, 2012 and discarded — Latest diff uploaded

    Information

    Review Board
    master

    Reviewers

    Currently, review ids that are rounded numbers or palindromes get a special trophy in the review detail page. Added Prime numbers to that list. 
    
    Summary of Changes:
    * reviewboard/reviews/templatetags/reviewtags.py
      + Added a isprime method that takes an integer and figures if its a prime. (Logic Taken from Stackoverflow and modified to ensure 1 is not a prime number) 
      + Make isneatnumber check for prime numbers. The restriction for ignoring ids less than 1000 has been relaxed for prime numbers. (Not sure if you would want this logic for primes)
    
    * reviewboard/reviews/tests.py
      + Added tests for prime numbers
      + Modified one of the ids for the testPalindrome as that happens to be a prime as well
    
    * reviewboard/templates/reviews/trophy_box.html
      + I dint know what image to use , so the patch currently uses the same "trophy.png" for both milestones and primes. This would need to be changed.
    Ran the test suite