1
Instead
form = get_random_string(size)
Try
form = GenEggForm()
Thanks to karthikr, If you want to initialize the form, try this
form = GenEggForm(initial={'Key': get_random_string(size)})
And render this to template
No need to apologize, we all start learning from zero
Source:stackexchange.com