diff --git a/email_cron b/email_cron deleted file mode 100644 index 559fd565..00000000 --- a/email_cron +++ /dev/null @@ -1,3 +0,0 @@ -* * * * * (cd /home/app/app/; /usr/bin/python3 manage.py send_mail) -0,20,40 * * * * (cd /home/app/app/; /usr/bin/python3 manage.py retry_deferred) -0 0 * * * (cd /home/app/app/; /usr/bin/python3 manage.py purge_mail_log 7) \ No newline at end of file diff --git a/hosting/forms.py b/hosting/forms.py index c6537355..8007b2f4 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -4,7 +4,7 @@ from django.contrib.auth import authenticate from utils.stripe_utils import StripeUtils -from .models import HostingOrder +from .models import HostingOrder, VirtualMachinePlan class HostingOrderAdminForm(forms.ModelForm): @@ -17,6 +17,10 @@ class HostingOrderAdminForm(forms.ModelForm): customer = self.cleaned_data.get('customer') vm_plan = self.cleaned_data.get('vm_plan') + if vm_plan.status == VirtualMachinePlan.CANCELED_STATUS: + raise forms.ValidationError("""You can't make a charge over + a canceled virtual machine plan""") + # Make a charge to the customer stripe_utils = StripeUtils() charge_response = stripe_utils.make_charge(customer=customer.stripe_id, @@ -53,7 +57,7 @@ class HostingUserLoginForm(forms.Form): CustomUser.objects.get(email=email) return email except CustomUser.DoesNotExist: - raise forms.ValidationError("User does not exists") + raise forms.ValidationError("User does not exist") else: return email diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index fc0b98f2..166a8241 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -83,6 +83,12 @@ h6 { height: 100%; } +.intro-reset-password { + background: url(../img/signup-bg.png) no-repeat center center; + background-size: cover; + height: 100%; +} + .intro-message > h1 { margin: 0; font-weight: 400; diff --git a/hosting/templates/emails/password_reset_email.html b/hosting/templates/emails/password_reset_email.html new file mode 100644 index 00000000..682834f5 --- /dev/null +++ b/hosting/templates/emails/password_reset_email.html @@ -0,0 +1,13 @@ +{% load i18n %}{% autoescape off %} +{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} + +{% trans "Please go to the following page and choose a new password:" %} + {% block reset_link %} + {{ base_url }}{% url 'hosting:reset_password_confirm' uidb64=uid token=token %} + {% endblock %} + +{% trans "Thanks for using our site!" %} + +{% blocktrans %}The {{ site_name }} team{% endblocktrans %} + +{% endautoescape %} \ No newline at end of file diff --git a/hosting/templates/emails/password_reset_email.txt b/hosting/templates/emails/password_reset_email.txt new file mode 100644 index 00000000..682834f5 --- /dev/null +++ b/hosting/templates/emails/password_reset_email.txt @@ -0,0 +1,13 @@ +{% load i18n %}{% autoescape off %} +{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} + +{% trans "Please go to the following page and choose a new password:" %} + {% block reset_link %} + {{ base_url }}{% url 'hosting:reset_password_confirm' uidb64=uid token=token %} + {% endblock %} + +{% trans "Thanks for using our site!" %} + +{% blocktrans %}The {{ site_name }} team{% endblocktrans %} + +{% endautoescape %} \ No newline at end of file diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 5c6110c5..5f0604a7 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -53,7 +53,7 @@ - +