Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EMAIL_USE_TLS = True
- EMAIL_HOST = 'smtp.sendgrid.com'
- EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
- EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
- EMAIL_PORT = 587
- from django.urls import path, include
- from users import views
- from django.conf import settings
- from django.conf.urls.static import static
- from users.forms import LoginForm
- from django.contrib import admin
- from django.contrib.auth import views as auth_views
- from booking.views import BookingView, BookingUpdateView
- urlpatterns = [
- path('', include('django.contrib.auth.urls')),
- path('signup/', views.SignUp.as_view(), name='signup'),
- path('login/', auth_views.LoginView.as_view(), {'authentication_form':
- LoginForm}, name='login'),
- path('profile/', views.view_profile, name='profile'),
- path('profile/<int:pk>/', views.view_profile, name='profile_with_pk'),
- path('profile/edit/', views.EditProfileView, name='edit_profile'),
- ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
- {% extends 'layout.html' %}
- {% load static %}
- {% load widget_tweaks %}
- {% block title %}Forgot Your Password?{% endblock %}
- {% block content %}
- <div class="container-fluid booking">
- <div class="container password_reset_text">
- <h3 class="password_text">Forgot your password?</h3>
- <p class="password_text">Enter your email address below, and we'll email
- instructions for setting a new one.</p>
- </div>
- <div class="container">
- <form class="password_text" method="post">
- {% csrf_token %}
- <div class="form-group">
- {% for field in form.visible_fields %}
- {{ field.errors }}
- {{ field.label_tag }}
- {% render_field field class="form-control" %}
- {% if field.help_text %}
- <small class="form-text text-muted">{{ field.help_text |safe }}</small>
- {% endif %}
- {% endfor %}
- </div>
- <button type="submit" class="btn btn-primary">Send Instructions</button>
- </form>
- </div>
- {% extends 'layout.html' %}
- {% load static %}
- {% load widget_tweaks %}
- {% block title %}Email Sent{% endblock %}
- {% block content %}
- <div class="container-fluid booking">
- <div class="container password_reset_text">
- <h3 class="password_text">Check your inbox.</h3>
- <p class="password_text">We've emailed you instructions for setting
- your password. You should receive the email shortly!</p>
- </div>
- </div>
- {% endblock %}
- {% extends 'layout.html' %}
- {% load static %}
- {% load widget_tweaks %}
- {% block title %}Enter new password{% endblock %}
- {% block content %}
- <div class="container-fluid booking">
- <div class="container password_reset_text">
- <h3 class="password_text">Set a new password!</h3>
- </div>
- <form class="password_text" method="post">
- {% csrf_token %}
- <div class="form-group">
- {% for field in form.visible_fields %}
- {{ field.errors }}
- {{ field.label_tag }}
- {% render_field field class="form-control" %}
- {% if field.help_text %}
- <small class="form-text text-muted">{{ field.help_text |safe }}</small>
- {% endif %}
- {% endfor %}
- </div>
- <button type="submit" class="btn btn-primary">Reset Password</button>
- </form>
- </div>
- {% endblock %}
- {% extends 'layout.html' %}
- {% load static %}
- {% load widget_tweaks %}
- {% block title %}Email Sent{% endblock %}
- {% block content %}
- <div class="container-fluid booking">
- <div class="container password_reset_text">
- <h3 class="password_text">Check your inbox.</h3>
- <p class="password_text">We've emailed you instructions for setting your
- password. You should receive the email shortly!</p>
- </div>
- </div>
- {% endblock %}
Add Comment
Please, Sign In to add comment