Generate User Identifier
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:
- load wordllist
- random.sample (no replacement) 6 words from wordlist (# of dice set by settings.py for easy changes)
- convert chosen_words list to dictionary (as django requires dict/array style items for template rendering
- 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.