From cb520f6b581a5de624eb734dde909eab7015bc7d Mon Sep 17 00:00:00 2001 From: Levi Date: Fri, 22 Jul 2016 01:24:32 -0500 Subject: [PATCH] Created signup view. Added login after signup.Added signup url to nosystem app urls.py. Added logout view, Added logout button on nabber, Added password reset form, Added password view , Added password reset html, Added password reset email for nosystemd app. Added confirm_reset_password.html, Added confirm_ reset password view, Added confirm reset password form, Fixed reset password token generation, Started donation view, Added donation view, Added donation.html, Added donation form, Adding donation.js lib in order to capture stripe payments for nosystem app. --- dynamicweb/urls.py | 2 +- hosting/admin.py | 4 +- .../{ => hosting}/emails/new_booked_vm.html | 0 .../{ => hosting}/emails/new_booked_vm.txt | 0 .../emails/password_reset_email.html | 0 .../emails/password_reset_email.txt | 0 .../{ => hosting}/emails/vm_charged.html | 0 .../{ => hosting}/emails/vm_charged.txt | 0 .../emails/vm_status_changed.html | 0 .../emails/vm_status_changed.txt | 0 hosting/templates/hosting/notifications.html | 2 +- hosting/templates/hosting/payment.html | 2 +- hosting/templates/hosting/signup.html | 3 +- .../hosting/virtual_machine_key.html | 2 +- .../templates/hosting/virtual_machines.html | 2 +- hosting/views.py | 96 ++++------ nosystemd/forms.py | 7 +- nosystemd/templates/nosystemd/base.html | 9 + .../nosystemd/confirm_reset_password.html | 50 ++++++ nosystemd/templates/nosystemd/donation.html | 119 +++++++++++++ .../emails/password_reset_email.html | 13 ++ .../nosystemd/emails/password_reset_email.txt | 13 ++ nosystemd/templates/nosystemd/landing.html | 11 +- nosystemd/templates/nosystemd/login.html | 29 ++- .../templates/nosystemd/reset_password.html | 42 +++++ nosystemd/templates/nosystemd/signup.html | 44 +++++ nosystemd/urls.py | 12 +- nosystemd/views.py | 166 +++++++++++++++++- utils/forms.py | 20 +++ utils/views.py | 83 ++++++++- 30 files changed, 645 insertions(+), 86 deletions(-) rename hosting/templates/{ => hosting}/emails/new_booked_vm.html (100%) rename hosting/templates/{ => hosting}/emails/new_booked_vm.txt (100%) rename hosting/templates/{ => hosting}/emails/password_reset_email.html (100%) rename hosting/templates/{ => hosting}/emails/password_reset_email.txt (100%) rename hosting/templates/{ => hosting}/emails/vm_charged.html (100%) rename hosting/templates/{ => hosting}/emails/vm_charged.txt (100%) rename hosting/templates/{ => hosting}/emails/vm_status_changed.html (100%) rename hosting/templates/{ => hosting}/emails/vm_status_changed.txt (100%) create mode 100644 nosystemd/templates/nosystemd/confirm_reset_password.html create mode 100644 nosystemd/templates/nosystemd/donation.html create mode 100644 nosystemd/templates/nosystemd/emails/password_reset_email.html create mode 100644 nosystemd/templates/nosystemd/emails/password_reset_email.txt create mode 100644 nosystemd/templates/nosystemd/reset_password.html create mode 100644 nosystemd/templates/nosystemd/signup.html diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py index 75ad121a..bd636e08 100644 --- a/dynamicweb/urls.py +++ b/dynamicweb/urls.py @@ -15,7 +15,7 @@ urlpatterns = [ url(r'^index.html$', LandingView.as_view()), url(r'^railshosting/', RailsHostingView.as_view(), name="rails.hosting"), url(r'^nodehosting/', NodeJSHostingView.as_view(), name="node.hosting"), url(r'^djangohosting/', DjangoHostingView.as_view(), name="django.hosting"), - url(r'^nosystemd/', include('nosystemd.urls'), name="nosystemd"), + url(r'^nosystemd/', include('nosystemd.urls', namespace="nosystemd")), url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), url(r'^jsi18n/(?P\S+?)/$', 'django.views.i18n.javascript_catalog'), diff --git a/hosting/admin.py b/hosting/admin.py index 70359b77..4d1489ce 100644 --- a/hosting/admin.py +++ b/hosting/admin.py @@ -43,7 +43,7 @@ class HostingOrderAdmin(admin.ModelAdmin): 'to': obj.customer.user.email, 'context': context, 'template_name': 'vm_charged', - 'template_path': 'emails/' + 'template_path': 'hosting/emails/' } email = BaseEmail(**email_data) email.send() @@ -87,7 +87,7 @@ class VirtualMachinePlanAdmin(admin.ModelAdmin): 'to': email, 'context': context, 'template_name': 'vm_status_changed', - 'template_path': 'emails/' + 'template_path': 'hosting/emails/' } email = BaseEmail(**email_data) email.send() diff --git a/hosting/templates/emails/new_booked_vm.html b/hosting/templates/hosting/emails/new_booked_vm.html similarity index 100% rename from hosting/templates/emails/new_booked_vm.html rename to hosting/templates/hosting/emails/new_booked_vm.html diff --git a/hosting/templates/emails/new_booked_vm.txt b/hosting/templates/hosting/emails/new_booked_vm.txt similarity index 100% rename from hosting/templates/emails/new_booked_vm.txt rename to hosting/templates/hosting/emails/new_booked_vm.txt diff --git a/hosting/templates/emails/password_reset_email.html b/hosting/templates/hosting/emails/password_reset_email.html similarity index 100% rename from hosting/templates/emails/password_reset_email.html rename to hosting/templates/hosting/emails/password_reset_email.html diff --git a/hosting/templates/emails/password_reset_email.txt b/hosting/templates/hosting/emails/password_reset_email.txt similarity index 100% rename from hosting/templates/emails/password_reset_email.txt rename to hosting/templates/hosting/emails/password_reset_email.txt diff --git a/hosting/templates/emails/vm_charged.html b/hosting/templates/hosting/emails/vm_charged.html similarity index 100% rename from hosting/templates/emails/vm_charged.html rename to hosting/templates/hosting/emails/vm_charged.html diff --git a/hosting/templates/emails/vm_charged.txt b/hosting/templates/hosting/emails/vm_charged.txt similarity index 100% rename from hosting/templates/emails/vm_charged.txt rename to hosting/templates/hosting/emails/vm_charged.txt diff --git a/hosting/templates/emails/vm_status_changed.html b/hosting/templates/hosting/emails/vm_status_changed.html similarity index 100% rename from hosting/templates/emails/vm_status_changed.html rename to hosting/templates/hosting/emails/vm_status_changed.html diff --git a/hosting/templates/emails/vm_status_changed.txt b/hosting/templates/hosting/emails/vm_status_changed.txt similarity index 100% rename from hosting/templates/emails/vm_status_changed.txt rename to hosting/templates/hosting/emails/vm_status_changed.txt diff --git a/hosting/templates/hosting/notifications.html b/hosting/templates/hosting/notifications.html index cd6247ea..6ba7977a 100644 --- a/hosting/templates/hosting/notifications.html +++ b/hosting/templates/hosting/notifications.html @@ -1,5 +1,5 @@ {% extends "hosting/base_short.html" %} -{% load staticfiles bootstrap3 %} +{% load staticfiles bootstrap3 i18n %} {% block content %}
diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index 985d91c7..6dd711ab 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -1,5 +1,5 @@ {% extends "hosting/base_short.html" %} -{% load staticfiles bootstrap3 %} +{% load staticfiles bootstrap3 i18n %} {% block content %}
diff --git a/hosting/templates/hosting/signup.html b/hosting/templates/hosting/signup.html index 94ae0d6d..c7aaca60 100644 --- a/hosting/templates/hosting/signup.html +++ b/hosting/templates/hosting/signup.html @@ -1,6 +1,5 @@ {% extends "hosting/base_short.html" %} -{% load staticfiles bootstrap3%} -{% load i18n %} +{% load staticfiles bootstrap3 i18n %} {% block content %}