mirror of
https://github.com/aykhans/series-robot-web.git
synced 2025-04-21 06:13:34 +00:00
Removed 'send_email' from register
This commit is contained in:
parent
ec3eddffa3
commit
7bfad1a5cb
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,3 +9,4 @@ celerybeat-schedule
|
||||
databasepostgresql_env
|
||||
SeriesRobot.pem
|
||||
certbot
|
||||
imdb_api_access
|
@ -11,5 +11,4 @@ class RegisterForm(UserCreationForm):
|
||||
'email',
|
||||
'password1',
|
||||
'password2',
|
||||
'imdb_api_key',
|
||||
'send_email')
|
||||
'imdb_api_key')
|
||||
|
@ -14,8 +14,7 @@
|
||||
{{form.password1|as_crispy_field}} <br>
|
||||
{{form.password2|as_crispy_field}} <br>
|
||||
{{form.imdb_api_key|as_crispy_field}}
|
||||
<a href="https://imdb-api.com/Identity/Account/Register">Get API Key</a> <br><br>
|
||||
{{form.send_email|as_crispy_field}} <br>
|
||||
<a href="https://imdb-api.com/Identity/Account/Register">Get API Key</a> <br>
|
||||
<style>
|
||||
.btn:hover {
|
||||
background: #fff;
|
||||
|
@ -32,9 +32,6 @@ def register_view(request): # sourcery skip: extract-method
|
||||
return redirect('register')
|
||||
|
||||
to_email = form.cleaned_data.get('email')
|
||||
if to_email is None and form.cleaned_data.get('send_email'):
|
||||
form.add_error('send_email', 'Email field is required to receive email notifications.')
|
||||
return render(request, 'register.html', context={"form": form})
|
||||
|
||||
form.save()
|
||||
username = form.cleaned_data.get('username')
|
||||
|
Loading…
x
Reference in New Issue
Block a user