Skip to content

Generate User Identifier

MariaV requested to merge make_passcode into master

New Form/View for User Identifier Generation

(Note: So far, none of these actions are touching database.)

Settings.py:

  • Updated with new settings for wordlist location and number of choices from wordlist

File addition

  • Added wordlist.txt (taken from EFF/SecureDrop revised wordlist) to shared folder app

New Form Class:

  • Created a new form class for AnonUser User Identifier generation, including several new methods:
  1. load wordllist
  2. random.sample (no replacement) 6 words from wordlist (# of dice set by settings.py for easy changes)
  3. convert chosen_words list to dictionary (as django requires dict/array style items for template rendering
  4. combination method that calls 1, 2, and 3 sequentially

New Form

  • created a new form from above class and created accompanying url and view.
  • tested with manage.py runserver; list of six words is displayed correctly

Updated 'home' view:

  • added this view/url structure to 'home' view so it can be accessed easily from application load.

12.08.20

Merge request reports

Loading