Guest User

Untitled

a guest
Feb 7th, 2019
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. EMAIL_USE_TLS = True
  2. EMAIL_HOST = 'smtp.sendgrid.com'
  3. EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
  4. EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
  5. EMAIL_PORT = 587
  6.  
  7. from django.urls import path, include
  8. from users import views
  9. from django.conf import settings
  10. from django.conf.urls.static import static
  11. from users.forms import LoginForm
  12. from django.contrib import admin
  13. from django.contrib.auth import views as auth_views
  14. from booking.views import BookingView, BookingUpdateView
  15.  
  16.  
  17.  
  18. urlpatterns = [
  19.  
  20. path('', include('django.contrib.auth.urls')),
  21. path('signup/', views.SignUp.as_view(), name='signup'),
  22. path('login/', auth_views.LoginView.as_view(), {'authentication_form':
  23. LoginForm}, name='login'),
  24. path('profile/', views.view_profile, name='profile'),
  25. path('profile/<int:pk>/', views.view_profile, name='profile_with_pk'),
  26. path('profile/edit/', views.EditProfileView, name='edit_profile'),
  27. ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  28.  
  29. {% extends 'layout.html' %}
  30.  
  31. {% load static %}
  32.  
  33. {% load widget_tweaks %}
  34.  
  35. {% block title %}Forgot Your Password?{% endblock %}
  36.  
  37. {% block content %}
  38.  
  39.  
  40. <div class="container-fluid booking">
  41. <div class="container password_reset_text">
  42. <h3 class="password_text">Forgot your password?</h3>
  43. <p class="password_text">Enter your email address below, and we'll email
  44. instructions for setting a new one.</p>
  45. </div>
  46. <div class="container">
  47.  
  48. <form class="password_text" method="post">
  49. {% csrf_token %}
  50.  
  51. <div class="form-group">
  52. {% for field in form.visible_fields %}
  53. {{ field.errors }}
  54. {{ field.label_tag }}
  55. {% render_field field class="form-control" %}
  56. {% if field.help_text %}
  57. <small class="form-text text-muted">{{ field.help_text |safe }}</small>
  58. {% endif %}
  59. {% endfor %}
  60. </div>
  61. <button type="submit" class="btn btn-primary">Send Instructions</button>
  62. </form>
  63.  
  64. </div>
  65.  
  66. {% extends 'layout.html' %}
  67.  
  68. {% load static %}
  69.  
  70. {% load widget_tweaks %}
  71.  
  72. {% block title %}Email Sent{% endblock %}
  73.  
  74. {% block content %}
  75.  
  76.  
  77. <div class="container-fluid booking">
  78. <div class="container password_reset_text">
  79. <h3 class="password_text">Check your inbox.</h3>
  80. <p class="password_text">We've emailed you instructions for setting
  81. your password. You should receive the email shortly!</p>
  82. </div>
  83. </div>
  84. {% endblock %}
  85.  
  86. {% extends 'layout.html' %}
  87.  
  88. {% load static %}
  89.  
  90. {% load widget_tweaks %}
  91.  
  92. {% block title %}Enter new password{% endblock %}
  93.  
  94. {% block content %}
  95.  
  96.  
  97. <div class="container-fluid booking">
  98. <div class="container password_reset_text">
  99. <h3 class="password_text">Set a new password!</h3>
  100. </div>
  101. <form class="password_text" method="post">
  102. {% csrf_token %}
  103.  
  104. <div class="form-group">
  105. {% for field in form.visible_fields %}
  106. {{ field.errors }}
  107. {{ field.label_tag }}
  108. {% render_field field class="form-control" %}
  109. {% if field.help_text %}
  110. <small class="form-text text-muted">{{ field.help_text |safe }}</small>
  111. {% endif %}
  112. {% endfor %}
  113. </div>
  114. <button type="submit" class="btn btn-primary">Reset Password</button>
  115. </form>
  116.  
  117.  
  118. </div>
  119. {% endblock %}
  120.  
  121. {% extends 'layout.html' %}
  122.  
  123. {% load static %}
  124.  
  125. {% load widget_tweaks %}
  126.  
  127. {% block title %}Email Sent{% endblock %}
  128.  
  129. {% block content %}
  130.  
  131.  
  132. <div class="container-fluid booking">
  133. <div class="container password_reset_text">
  134. <h3 class="password_text">Check your inbox.</h3>
  135. <p class="password_text">We've emailed you instructions for setting your
  136. password. You should receive the email shortly!</p>
  137. </div>
  138. </div>
  139. {% endblock %}
Add Comment
Please, Sign In to add comment