diff --git a/.gitignore b/.gitignore index 2bfa8cdf..6e6250b1 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,3 @@ secret-key .idea/ .env -*.mo diff --git a/Changelog b/Changelog index ba777bac..f3e3d4d4 100644 --- a/Changelog +++ b/Changelog @@ -1,20 +1,29 @@ -1.0.0: 2017-05-25 - * Initial stable release +1.0.8: 2017-06-08 + * [datacenterlight] Fixed german typos + * [datacenterlight] Refactored dcl order/success templates +1.0.7: 2017-06-08 + * [datacenterlight] Fixed an issue causing header images not appear in the blog +1.0.6: 2017-06-06 + * [datacenterlight] Hotfix, feature/manualorder added +1.0.5: 2017-06-06 + * [all] General cleanup + * [datacenterlight] Add German translations + * [datacenterlight] Change beta access to subscriptions + * [hosting] Add German translations + * [blog] Add German translation for header + * [opennebula_api] Improve testing, add ssh key functions + * [opennebula_api] Remove template views + * [datacenterlight] Allow user to have multiple ssh keys + * [datacenterlight] Changed stripe.js v2 to v3 + * [datacenterlight] Added support for stripe payment errors on current user language +1.0.4: 2017-06-05 + * [all] Added new Domains to accept +1.0.3: 2017-06-02 + * [datacenterlight] Hotfix, remove footer on mobile devices +1.0.2: 2017-05-28 + * [datacenterlight] Fixed login redirecting to blank page after logout 1.0.1: 2017-05-26 * [datacenterlight] Allow storage to shrink / grow only in 10th of GB * [datacenterlight] Fix initially shown price -1.0.2: 2017-05-28 - * [datacenterlight] Fixed login redirecting to blank page after logout -1.0.3: 2017-06-02 - * [datacenterlight] Hotfix, remove footer on mobile devices - -next: - * [datacenterlight] Add German translations - * [datacenterlight] Change beta access to subscriptions - * [hosting] Add German translations - * [blog] Add German translation for header - * [opennebula_api] Improve testing, add ssh key functions - * [opennebula_api] Remove template views - * [datacenterlight] Allow user to have multiple ssh keys - * [datacenterlight] Changed stripe.js v2 to v3 - * [datacenterlight] Added support for stripe payment errors on current user language +1.0.0: 2017-05-25 + * Initial stable release diff --git a/alplora/locale/de/LC_MESSAGES/django.mo b/alplora/locale/de/LC_MESSAGES/django.mo new file mode 100644 index 00000000..c69bd979 Binary files /dev/null and b/alplora/locale/de/LC_MESSAGES/django.mo differ diff --git a/cms_templates/djangocms_blog/_header_post_detail.html b/cms_templates/djangocms_blog/_header_post_detail.html index 909b8427..fb49e5ca 100644 --- a/cms_templates/djangocms_blog/_header_post_detail.html +++ b/cms_templates/djangocms_blog/_header_post_detail.html @@ -1,4 +1,5 @@ {% load cms_tags staticfiles %} +{% load i18n %}
\n" "Language-Team: LANGUAGE \n" @@ -27,14 +27,14 @@ msgid "Enter email" msgstr "E-Mail-Adresse" #: templates/datacenterlight/beta_access.html:21 -msgid "Request Newsletter" -msgstr "Newsletter abonnieren" +msgid "Request Beta Access" +msgstr "Beantrage Beta-Zugang" -#: templates/datacenterlight/beta_success.html:9 +#: templates/datacenterlight/beta_success.html:10 msgid "Request Sent" msgstr "Anfrage verschickt" -#: templates/datacenterlight/beta_success.html:12 +#: templates/datacenterlight/beta_success.html:13 msgid "" "Thank you for your subscription! You will receive a confirmation mail from " "our team" @@ -75,71 +75,42 @@ msgstr "" msgid "Thank you!" msgstr "Vielen Dank!" -#: templates/datacenterlight/index.html:62 -#: templates/datacenterlight/index.html:147 -#: templates/datacenterlight/index.html:346 -#: templates/datacenterlight/pricing.html:62 -#: templates/datacenterlight/pricing.html:202 -msgid "What is it" -msgstr "Was ist es?" - -#: templates/datacenterlight/index.html:65 -#: templates/datacenterlight/index.html:190 -#: templates/datacenterlight/index.html:349 -#: templates/datacenterlight/pricing.html:65 -#: templates/datacenterlight/pricing.html:205 -msgid "Scale out" -msgstr "Skalierung" - -#: templates/datacenterlight/index.html:68 -#: templates/datacenterlight/index.html:216 -#: templates/datacenterlight/index.html:352 -#: templates/datacenterlight/pricing.html:68 -#: templates/datacenterlight/pricing.html:208 -msgid "Reliable and light" -msgstr "Zuverlässig und leicht" - -#: templates/datacenterlight/index.html:71 -msgid "Order VM" -msgstr "VM bestellen" - -#: templates/datacenterlight/index.html:74 -#: templates/datacenterlight/index.html:359 -#: templates/datacenterlight/pricing.html:74 -#: templates/datacenterlight/pricing.html:215 -msgid "Contact" -msgstr "Kontakt" - -#: templates/datacenterlight/index.html:114 +#: templates/datacenterlight/home.html:15 msgid "Finally, an affordable VM hosting in Switzerland!" msgstr "Endlich: bezahlbares VM Hosting in der Schweiz" -#: templates/datacenterlight/index.html:118 +#: templates/datacenterlight/home.html:19 msgid "What is it?" msgstr "Was ist es?" -#: templates/datacenterlight/index.html:121 +#: templates/datacenterlight/home.html:22 msgid "I want it!" msgstr "Das will ich haben!" -#: templates/datacenterlight/index.html:150 +#: templates/datacenterlight/home.html:46 +#: templates/datacenterlight/includes/_footer.html:14 +#: templates/datacenterlight/includes/_navbar.html:26 +msgid "What is it" +msgstr "Was ist es?" + +#: templates/datacenterlight/home.html:49 msgid "Our data center" msgstr "Unser Datacenter" -#: templates/datacenterlight/index.html:157 +#: templates/datacenterlight/home.html:56 msgid "" "Reuses existing factory halls instead of building a new expensive building." msgstr "" "Verwendet ehemalige Fabrikhallen anstatt ein neues, teures Gebäude zu " "errichten.
" -#: templates/datacenterlight/index.html:162 +#: templates/datacenterlight/home.html:61 msgid "Only wants you to pay for what you actually need.\\u2028" msgstr "" "Möchte, dass du nur bezahlst, was du auch wirklich brauchst: Wähle deine " "Ressourcen individuell aus!
" -#: templates/datacenterlight/index.html:166 +#: templates/datacenterlight/home.html:65 msgid "" "Is creative, using a modern and alternative design for a data center in " "order to make it more sustainable and affordable at the same time.\\u2028" @@ -148,7 +119,7 @@ msgstr "" "macht um Nachhaltigkeit zu fördern und somit erschwingliche Preise bieten zu " "können.
" -#: templates/datacenterlight/index.html:170 +#: templates/datacenterlight/home.html:69 msgid "" "Cuts down the costs for you by using FOSS (Free Open Source Software) " "exclusively, wherefore we can save money from paying licenses." @@ -157,7 +128,13 @@ msgstr "" "mit FOSS (Free Open Source Software) arbeitet und wir daher auf " "Lizenzgebühren verzichten können.
" -#: templates/datacenterlight/index.html:193 +#: templates/datacenterlight/home.html:89 +#: templates/datacenterlight/includes/_footer.html:17 +#: templates/datacenterlight/includes/_navbar.html:29 +msgid "Scale out" +msgstr "Skalierung" + +#: templates/datacenterlight/home.html:92 msgid "" "We don't use special hardware. We use commodity hardware: we buy computers " "that you buy. Just many more and put them in a cozy home for computers " @@ -167,7 +144,13 @@ msgstr "" "erschwingliche Systeme. Bei grösserer Auslastung werden mehr Standard " "komponenten hinzugekauft und skalieren so das Datencenter." -#: templates/datacenterlight/index.html:219 +#: templates/datacenterlight/home.html:115 +#: templates/datacenterlight/includes/_footer.html:20 +#: templates/datacenterlight/includes/_navbar.html:32 +msgid "Reliable and light" +msgstr "Zuverlässig und leicht" + +#: templates/datacenterlight/home.html:118 msgid "" "Our VMs are located in Switzerland, with reliable power supply and fast " "internet connection. Our VM costs less thanks to our featherlight " @@ -177,78 +160,84 @@ msgstr "" "Energieversorgung sowie schneller Internetverbindung ausgestattet. Unser " "Angebot ist aufgrund unserer leichten Infrastruktur überaus kostengünstig." -#: templates/datacenterlight/index.html:237 -#: templates/datacenterlight/pricing.html:106 +#: templates/datacenterlight/home.html:136 +#: templates/datacenterlight/order.html:9 +#: templates/datacenterlight/pricing.html:9 msgid "We are cutting down the costs significantly!" msgstr "Wir sorgen dafür, dass die Kosten für Sie signifikant abnehmen" -#: templates/datacenterlight/index.html:238 +#: templates/datacenterlight/home.html:137 msgid "Affordable VM hosting based in Switzerland" msgstr "Bezahlbares VM Hosting in der Schweiz" -#: templates/datacenterlight/index.html:245 -#: templates/datacenterlight/pricing.html:119 +#: templates/datacenterlight/home.html:144 +#: templates/datacenterlight/order.html:22 +#: templates/datacenterlight/pricing.html:22 msgid "VM hosting" msgstr "VM Hosting" -#: templates/datacenterlight/index.html:252 +#: templates/datacenterlight/home.html:151 msgid "Based in Switzerland" msgstr "Standort des Datacenters ist in der Schweiz" -#: templates/datacenterlight/index.html:261 +#: templates/datacenterlight/home.html:160 msgid "10 GB Storage (SSD)" msgstr "10 GB Storage (SSD)" -#: templates/datacenterlight/index.html:264 -#: templates/datacenterlight/pricing.html:173 +#: templates/datacenterlight/home.html:163 +#: templates/datacenterlight/order.html:74 +#: templates/datacenterlight/pricing.html:76 msgid "Order Now!" msgstr "Bestelle jetzt!" -#: templates/datacenterlight/index.html:280 -msgid "Want to know more? Subscribe to our newsletter!" -msgstr "Willst du mehr wissen? Abonniere unseren Newsletter!" - -#: templates/datacenterlight/index.html:307 +#: templates/datacenterlight/home.html:186 msgid "Switzerland " msgstr "Schweiz" -#: templates/datacenterlight/index.html:324 +#: templates/datacenterlight/home.html:203 msgid "Questions?" msgstr "Fragen?" -#: templates/datacenterlight/index.html:324 +#: templates/datacenterlight/home.html:203 msgid "Contact us!" msgstr "Kontaktiere uns!" -#: templates/datacenterlight/index.html:342 -#: templates/datacenterlight/pricing.html:198 +#: templates/datacenterlight/includes/_footer.html:10 msgid "Home" msgstr "Home" -#: templates/datacenterlight/index.html:355 -#: templates/datacenterlight/pricing.html:211 +#: templates/datacenterlight/includes/_footer.html:23 msgid "Pricing" msgstr "Preise" -#: templates/datacenterlight/pricing.html:71 -msgid "Buy VM" -msgstr "VM Kaufen" +#: templates/datacenterlight/includes/_footer.html:27 +#: templates/datacenterlight/includes/_navbar.html:38 +msgid "Contact" +msgstr "Kontakt" -#: templates/datacenterlight/pricing.html:127 +#: templates/datacenterlight/includes/_navbar.html:35 +msgid "Order VM" +msgstr "VM bestellen" + +#: templates/datacenterlight/order.html:30 +#: templates/datacenterlight/pricing.html:30 msgid "Hosted in Switzerland" msgstr "Standort des Datacenters ist in der Schweiz" -#: templates/datacenterlight/pricing.html:144 +#: templates/datacenterlight/order.html:47 +#: templates/datacenterlight/pricing.html:47 msgid "GB Storage (SSD)" msgstr "GB Storage (SSD)" -#: templates/datacenterlight/pricing.html:180 +#: templates/datacenterlight/order.html:84 +#: templates/datacenterlight/pricing.html:83 msgid "Simple and affordable: Try our virtual machine with featherlight price." msgstr "" -"Einfach und bezahlbar: Testen Sie unsere virtuelen Machinen mit " +"Einfach und bezahlbar: Testen Sie unsere virtuellen Maschinen mit " "federleichten Preisen" -#: templates/datacenterlight/pricing.html:183 +#: templates/datacenterlight/order.html:87 +#: templates/datacenterlight/pricing.html:86 msgid "" "Our VMs are hosted in Glarus, Switzerland, and our website is currently " "running in BETA mode. If you want more information that you did not find on " @@ -264,34 +253,51 @@ msgstr "" "uns unter support@datacenterlight.ch. Unser Team wird sich umgehend um dein " "Anliegen kümmern!" -#~ msgid "" -#~ "Is located in Glarus, Switzerland where your data is under strict privacy." -#~ msgstr "" -#~ "Befindet sich in Glarus, in der Schweiz, wo deine Daten unter striktem " -#~ "Schutz stehen." +#: templates/datacenterlight/success.html:8 +msgid "Thank you for order! Our team will contact you via email" +msgstr "" +"Vielen Dank für die Bestellung. Unser Team setzt sich sobald wie möglich mit " +"Ihnen via E-Mail in Verbindung." -#~ msgid "Has qualified workers on site who take care of the hardware.\\u2028" -#~ msgstr "" -#~ "Hat qualifizierte Mitarbeiter vor Ort, die sich um die Hardware kümmern." +#: templates/datacenterlight/success.html:10 +msgid "as soon as possible!" +msgstr "" #~ msgid "" -#~ "Renounces active cooling by taking an advantage of the isolation of our " -#~ "tight factory walls." +#~ "Reuse existing factory halls intead of building an expensive building." #~ msgstr "" -#~ "Verzichtet auf aktive Kühlung, indem es sich die Isolation unserer " -#~ "ehemaligen Fabrikhalle zu Nutze macht." +#~ "Nachhaltigkeit: Wiederverwendung ehemaliger Fabrikhallen an Stelle der " +#~ "Errichtung eines neuen Gebäudes" -#~ msgid "More Info" -#~ msgstr "Weitere Informationen" - -#~ msgid "How it works" -#~ msgstr "Wie es funktioniert" +#~ msgid "" +#~ "Being creative, using modern and alternative design for a datacenter." +#~ msgstr "" +#~ "Kreativität: Verwendung eines modernen und alternativen Designs für unser " +#~ "Datencenter" #~ msgid "Being open: Using FOSS exclusively, we can save money for licenses." #~ msgstr "" #~ "Offene Verfahrensweise: Die Benutzung eines eigenen Frameworks, FOSS, " #~ "erspart Lizenzgebühren" +#~ msgid "More Info" +#~ msgstr "Weitere Informationen" + +#~ msgid "Want to know more? Subscribe to our newsletter!" +#~ msgstr "Willst du mehr wissen? Abonniere unseren Newsletter!" + +#~ msgid "I want to have it!" +#~ msgstr "Das möchte ich haben!" + +#~ msgid "Buy VM" +#~ msgstr "VM Kaufen" + +#~ msgid "Request Newsletter" +#~ msgstr "Newsletter abonnieren" + +#~ msgid "How it works" +#~ msgstr "Wie es funktioniert" + #~ msgid "Our VMs are hosted in Glarus, Switzerland." #~ msgstr "Standort des Datacenters ist in der Schweiz" @@ -304,18 +310,9 @@ msgstr "" #~ "davon nichts mitbekommen, falls doch melden Sie sich bitte via " #~ "support@datacenterlight.ch" -#~ msgid "Request Beta Access" -#~ msgstr "Beantrage Beta-Zugang" - -#~ msgid "Thank you, we will contact you as soon as possible" -#~ msgstr "Vielen Dank, wir werden Sie sobald als möglich kontaktieren." - #~ msgid "Buy Now!" #~ msgstr "Kaufe jetzt!" -#~ msgid "I want to try!" -#~ msgstr "Das möchte ich haben" - #~ msgid "Email address" #~ msgstr "E-Mail Adresse" diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 52c2bbdc..275ccb56 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -280,6 +280,10 @@ h6 { align-items: center; position: relative; } +.intro-pricing.success-pricing{ + height: 100vh; + max-height: 100vh; +} .intro-pricing::before{ content: ""; position: absolute; @@ -287,7 +291,7 @@ h6 { bottom: 0; left: 0; right: 0; - background: rgba(90, 116, 175, 0.8); + background: rgba(90, 116, 175, 0.7); } .intro-pricing .intro-message .section-heading{ font-size: 45px; @@ -507,7 +511,6 @@ h6 { position: relative; } .full-contact-section{ - padding-top: 90px; background-image: -ms-linear-gradient(right, #29427A 50%, #4F6699 100%); background-image: -moz-linear-gradient(right, #29427A 50%, #4F6699 100%); background-image: -o-linear-gradient(right, #29427A 50%, #4F6699 100%); @@ -642,7 +645,7 @@ h6 { } .price-calc-section .card .description span { - font-size: 18px; + font-size: 16px; margin-left: 4px; margin-left: 0px; /* justify-self: start; */ @@ -866,6 +869,11 @@ h6 { color: #29427A; font-size: 30px; } + + .intro-pricing .intro-message .section-heading { + font-size: 30px; + } + .price-calc-section{ flex-direction: column; padding: 60px 10px !important; @@ -900,7 +908,6 @@ h6 { width: 60px; } - } @media(max-width:540px) { @@ -917,7 +924,7 @@ h6 { .intro-message > h1 { font-size: 2em; } - .price-calc-section .text .section-heading { + .price-calc-section .text .section-heading { font-size: 24px; line-height: 25px; } @@ -1018,3 +1025,7 @@ a#forgotpassword { .form-300{ width: 300px; } + +.error-message-box{ + margin-top: 20px; +} diff --git a/datacenterlight/static/datacenterlight/js/main.js b/datacenterlight/static/datacenterlight/js/main.js index 57a802b3..26688e8e 100644 --- a/datacenterlight/static/datacenterlight/js/main.js +++ b/datacenterlight/static/datacenterlight/js/main.js @@ -138,59 +138,3 @@ })(jQuery); -// (function($){ -// 'use strict'; // Start of use strict - - - -// $(document).ready(function(){ -// verifiedUrl(); -// init_options_interested(); -// init_nav(); -// change_values(); -// }); - -// function verifiedUrl(){ -// if(window.location.href.indexOf('#success') > -1){ -// form_success(); -// } -// } - -// function init_options_interested(){ -// $('.row-vms').click(function(){ -// $('.row-vms').removeClass('row-vms__active'); -// $(this).addClass('row-vms__active'); -// var number = $('.row-vms__active input').val(); -// var price = $('.row-vms__active input').data('price'); -// _calculate(number, price); -// }); -// } - -// function init_nav(){ - -// $('.nav-local').click(function(){ -// $('html, body').animate({ -// scrollTop: $('#'+$(this).data('href')).offset().top -// }); -// }); - -// } - -// function change_values(){ -// $('.number-vms').keyup(function () { -// var number = $(this).val(); -// var price = $(this).data('price'); -// _calculate(number, price); -// }); - -// } -// function form_success(){ -// $('#sucessModal').modal('show'); -// } -// function _calculate(numbers, price){ -// $('#valueTotal').text(numbers*price*31); -// } - - -// })(jQuery); // End of use strict - diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index 82072cac..06fcd804 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -1,24 +1,21 @@ {% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} - + - - - - datacenterlight.ch - Featherlight Swiss VM + + + Data Center Light - + {% block title %}VM hosting made in Switzerland{% endblock %} - - - @@ -36,7 +33,6 @@ - @@ -54,21 +50,6 @@ - @@ -77,7 +58,53 @@ + + + + + + diff --git a/datacenterlight/templates/datacenterlight/beta_access.html b/datacenterlight/templates/datacenterlight/beta_access.html index 19714d40..7a694611 100644 --- a/datacenterlight/templates/datacenterlight/beta_access.html +++ b/datacenterlight/templates/datacenterlight/beta_access.html @@ -18,7 +18,7 @@ {{ form.email.errors|striptags}} - + + + + + + + +{% endblock %} + + diff --git a/datacenterlight/templates/datacenterlight/pricing.html b/datacenterlight/templates/datacenterlight/pricing.html index 9786f876..3016dc3a 100644 --- a/datacenterlight/templates/datacenterlight/pricing.html +++ b/datacenterlight/templates/datacenterlight/pricing.html @@ -87,4 +87,7 @@ -{% endblock %} \ No newline at end of file +{% endblock %} + + + diff --git a/datacenterlight/templates/datacenterlight/success.html b/datacenterlight/templates/datacenterlight/success.html new file mode 100644 index 00000000..4cbee12a --- /dev/null +++ b/datacenterlight/templates/datacenterlight/success.html @@ -0,0 +1,40 @@ +{% extends "datacenterlight/base.html" %} +{% load staticfiles i18n %} +{% block content %} + +
+ +
+

{% trans "Thank you for order! Our team will contact you via email" %}

+ {% if LANGUAGE_CODE == 'en-us'%} +

{% trans "as soon as possible!" %}

+ {% endif %} +
+ +
+ + + + + + + + + + + +{% endblock %} \ No newline at end of file diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index 9c3c84fb..f14e7186 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import url -from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView +from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView, SuccessView, OrderView urlpatterns = [ @@ -8,5 +8,7 @@ urlpatterns = [ url(r'^/beta-program/?$', BetaProgramView.as_view(), name='beta'), url(r'^/landing/?$', LandingProgramView.as_view(), name='landing'), url(r'^/pricing/?$', PricingView.as_view(), name='pricing'), + url(r'^/order/?$', OrderView.as_view(), name='order'), + url(r'^/order-success/?$', SuccessView.as_view(), name='order_success'), url(r'^/beta_access?$', BetaAccessView.as_view(), name='beta_access'), ] diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 519804cd..a0f996cd 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -7,6 +7,8 @@ from django.core.urlresolvers import reverse_lazy, reverse from utils.mailer import BaseEmail from django.shortcuts import render from django.shortcuts import redirect +from django import forms +from django.core.exceptions import ValidationError from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineTemplateSerializer @@ -14,6 +16,9 @@ from opennebula_api.serializers import VirtualMachineTemplateSerializer class LandingProgramView(TemplateView): template_name = "datacenterlight/landing.html" +class SuccessView(TemplateView): + template_name = "datacenterlight/success.html" + class PricingView(TemplateView): template_name = "datacenterlight/pricing.html" @@ -27,8 +32,8 @@ class PricingView(TemplateView): } except: messages.error( request, - 'We could not load the VM templates due to a backend connection \ - error. Please try again in a few minutes' + 'We have a temporary problem to connect to our backend. \ + Please try again in a few minutes' ) context = { 'error' : 'connection' @@ -64,9 +69,84 @@ class PricingView(TemplateView): return redirect(reverse('hosting:payment')) +class OrderView(TemplateView): + template_name = "datacenterlight/order.html" + + def get(self, request, *args, **kwargs): + try: + manager = OpenNebulaManager() + templates = manager.get_templates() + + context = { + 'templates': VirtualMachineTemplateSerializer(templates, many=True).data, + } + except: + messages.error( request, + 'We have a temporary problem to connect to our backend. \ + Please try again in a few minutes' + ) + context = { + 'error' : 'connection' + } + + return render(request, self.template_name, context) + + def post(self, request): + + cores = request.POST.get('cpu') + memory = request.POST.get('ram') + storage = request.POST.get('storage') + price = request.POST.get('total') + template_id = int(request.POST.get('config')) + manager = OpenNebulaManager() + template = manager.get_template(template_id) + template_data = VirtualMachineTemplateSerializer(template).data + + name = request.POST.get('name') + email = request.POST.get('email') + name_field = forms.CharField() + email_field = forms.EmailField() + try: + name = name_field.clean(name) + except ValidationError as err: + messages.add_message(self.request, messages.ERROR, '%(value) is not a proper name.'.format(name)) + return HttpResponseRedirect(reverse('datacenterlight:order')) + + try: + email = email_field.clean(email) + except ValidationError as err: + messages.add_message(self.request, messages.ERROR, '%(value) is not a proper email.'.format(email)) + return HttpResponseRedirect(reverse('datacenterlight:order')) + + # We have valid email and name of the customer, hence send an + # email to the admin + + context = { + 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), + 'name': name, + 'email': email, + 'cores': cores, + 'memory': memory, + 'storage': storage, + 'price': price, + 'template': template_data['name'], + } + email_data = { + 'subject': 'New Order Received', + 'to': 'info@ungleich.ch', + 'context': context, + 'template_name': 'new_order_notification', + 'template_path': 'datacenterlight/emails/' + } + email = BaseEmail(**email_data) + email.send() + + return HttpResponseRedirect(reverse('datacenterlight:order_success')) + + class BetaAccessView(FormView): template_name = "datacenterlight/beta_access.html" - form_class = BetaAccessForm + form_class = BetaAccessForm success_message = "Thank you, we will contact you as soon as possible" def form_valid(self, form): @@ -78,6 +158,7 @@ class BetaAccessView(FormView): email_data = { 'subject': 'DatacenterLight Beta Access Request', 'to': form.cleaned_data.get('email'), + 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'context': context, 'template_name': 'request_access_confirmation', 'template_path': 'datacenterlight/emails/' @@ -91,7 +172,8 @@ class BetaAccessView(FormView): email_data = { 'subject': 'DatacenterLight Beta Access Request', - 'to': 'info@ungleich.ch', + 'to': 'support@datacenterlight.ch', + 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'context': context, 'template_name': 'request_access_notification', 'template_path': 'datacenterlight/emails/' @@ -151,43 +233,6 @@ class BetaProgramView(CreateView): messages.add_message(self.request, messages.SUCCESS, self.success_message) return HttpResponseRedirect(self.get_success_url()) - # return super(BetaProgramView, self).form_valid(form) - - - - - # def form_valid(self, form): - - # context = { - # 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()) - # } - - # email_data = { - # 'subject': 'DatacenterLight Beta Access Request', - # 'to': form.cleaned_data.get('email'), - # 'context': context, - # 'template_name': 'request_access_confirmation', - # 'template_path': 'datacenterlight/emails/' - # } - # email = BaseEmail(**email_data) - # email.send() - - # context.update({ - # 'email': form.cleaned_data.get('email') - # }) - - # email_data = { - # 'subject': 'DatacenterLight Beta Access Request', - # 'to': 'info@ungleich.ch', - # 'context': context, - # 'template_name': 'request_access_notification', - # 'template_path': 'datacenterlight/emails/' - # } - # email = BaseEmail(**email_data) - # email.send() - - # messages.add_message(self.request, messages.SUCCESS, self.success_message) - # return super(IndexView, self).form_valid(form) class IndexView(CreateView): @@ -218,6 +263,7 @@ class IndexView(CreateView): email_data = { 'subject': 'DatacenterLight Beta Access Request', 'to': form.cleaned_data.get('email'), + 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'context': context, 'template_name': 'request_access_confirmation', 'template_path': 'datacenterlight/emails/' @@ -231,7 +277,8 @@ class IndexView(CreateView): email_data = { 'subject': 'DatacenterLight Beta Access Request', - 'to': 'info@ungleich.ch', + 'to': 'support@datacenterlight.ch', + 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'context': context, 'template_name': 'request_access_notification', 'template_path': 'datacenterlight/emails/' @@ -241,5 +288,3 @@ class IndexView(CreateView): messages.add_message(self.request, messages.SUCCESS, self.success_message) return super(IndexView, self).form_valid(form) - - diff --git a/digitalglarus/locale/de/LC_MESSAGES/django.mo b/digitalglarus/locale/de/LC_MESSAGES/django.mo new file mode 100644 index 00000000..77296614 Binary files /dev/null and b/digitalglarus/locale/de/LC_MESSAGES/django.mo differ diff --git a/dump.rdb b/dump.rdb deleted file mode 100644 index b1f23313..00000000 Binary files a/dump.rdb and /dev/null differ diff --git a/dynamicweb/settings/__init__old.py b/dynamicweb/settings/__init__old.py deleted file mode 100644 index 910bfe63..00000000 --- a/dynamicweb/settings/__init__old.py +++ /dev/null @@ -1,423 +0,0 @@ -""" -Copyright 2015 ungleich. -""" - -# -*- coding: utf-8 -*- -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -import os -from django.utils.translation import ugettext_lazy as _ -# dotenv -import dotenv - -gettext = lambda s: s - - -def env(env_name): - return os.environ.get(env_name) - -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -PROJECT_DIR = os.path.abspath( - os.path.join(os.path.dirname(__file__), "../.."), -) - -# load .env file -dotenv.read_dotenv("{0}/.env".format(PROJECT_DIR)) - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ - -SITE_ID = 1 - -APP_ROOT_ENDPOINT = "/" - -LOGIN_URL = None -LOGOUT_URL = None -LOGIN_REDIRECT_URL = None - -EMAIL_HOST = "localhost" -EMAIL_PORT = 25 - -SECRET_KEY = env('DJANGO_SECRET_KEY') - -# Application definition - -INSTALLED_APPS = ( - 'djangocms_admin_style', - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'django.contrib.sites', - 'cms', # django CMS itself - 'treebeard', # utilities for implementing a tree - 'menus', # helper for model independent hierarchical website navigation - 'sekizai', # for javascript and css management - # django-cms plugins - 'djangocms_flash', - 'djangocms_googlemap', - 'djangocms_inherit', - 'djangocms_link', - 'djangocms_snippet', - 'djangocms_teaser', - 'djangocms_page_meta', - # django-filer - 'cmsplugin_filer_file', - 'cmsplugin_filer_folder', - 'cmsplugin_filer_link', - 'cmsplugin_filer_teaser', - 'cmsplugin_filer_video', - # versioning - 'reversion', - # ck-editor - 'djangocms_text_ckeditor', - # djangocms-blog - 'filer', - 'easy_thumbnails', - 'cmsplugin_filer_image', - 'parler', - 'taggit', - 'taggit_autosuggest', - 'django_select2', - 'meta', - 'meta_mixin', -# 'admin_enhancer', - 'djangocms_blog', - 'bootstrap3', - 'compressor', - # ungleich - 'ungleich', - 'hosting', - 'digitalglarus', -) - -MIDDLEWARE_CLASSES = ( - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.middleware.locale.LocaleMiddleware', - # django-cms middlewares - 'cms.middleware.user.CurrentUserMiddleware', - 'cms.middleware.page.CurrentPageMiddleware', - 'cms.middleware.toolbar.ToolbarMiddleware', - 'cms.middleware.language.LanguageCookieMiddleware', -) - -ROOT_URLCONF = 'dynamicweb.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'dynamicweb.wsgi.application' - -# Deprecated since version 1.8. -# callables take a request object as their argument and return a dictionary of -# items to be merged into the context. -TEMPLATE_CONTEXT_PROCESSORS = ( - "django.contrib.auth.context_processors.auth", - "django.core.context_processors.debug", - "django.core.context_processors.i18n", - "django.core.context_processors.media", - "django.core.context_processors.static", - "django.core.context_processors.tz", - "django.contrib.messages.context_processors.messages", - "django.core.context_processors.request", - 'sekizai.context_processors.sekizai', - 'cms.context_processors.cms_settings', -) - -TEMPLATE_DIRS = ( - os.path.join(PROJECT_DIR, 'templates'), -) - -CMS_TEMPLATES_DIR = { - 1: os.path.join(TEMPLATE_DIRS[0], 'cms/'), -} - -# Database -# https://docs.djangoproject.com/en/1.8/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'app', - } -} - -# Internationalization -# https://docs.djangoproject.com/en/1.7/topics/i18n/ - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_L10N = True - -USE_TZ = True - -LANGUAGES = ( - ('en-us', _('English')), - ('de', _('Deutsch')), -) - -LANGUAGE_CODE = 'en-us' - -CMS_PLACEHOLDER_CONF = { - 'logo_image': { - 'name': 'Logo Image', - 'plugins': ['FilerImagePlugin'], - 'limits': { - 'global': 1, - } - }, - 'page-title': { - 'name': 'Page Title', - 'plugins': ['TextPlugin'], - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': { - 'body': 'Page Title...' - } - } - ], - 'limits': { - 'global': 1, - } - }, - 'page-subtitle': { - 'name': 'Page Subtitle', - 'inherit': 'page-title', - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': { - 'body': 'Page subtitle...' - } - } - ], - }, - 'footer_copyright': { - 'name': 'Copyright', - 'inherit': 'page-title', - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': { - 'body': 'Copyright...' - } - } - ], - }, - 'content': { - 'name': _('Content'), - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': {'body': '

'}, - }, - ] - }, - 'post_content': { - 'name': _('Content'), - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': {'body': '

'}, - }, - ] - }, -} - -CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache', - 'LOCATION': '127.0.0.1:11211', - } -} - -if LOGIN_URL is None: - LOGIN_URL = APP_ROOT_ENDPOINT + 'accounts/login/' -if LOGOUT_URL is None: - LOGOUT_URL = APP_ROOT_ENDPOINT + 'accounts/logout/' -if LOGIN_REDIRECT_URL is None: - LOGIN_REDIRECT_URL = APP_ROOT_ENDPOINT - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.7/howto/static-files/ - -STATIC_URL = '/static/' - -STATIC_ROOT = os.path.join(PROJECT_DIR, 'static') - -MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media') -MEDIA_URL = APP_ROOT_ENDPOINT + 'media/' -FILE_UPLOAD_PERMISSIONS = 0o644 - -# Templates confs -TEMPLATE_DIRS = ( - os.path.join(PROJECT_DIR, "templates"), -) - -META_SITE_PROTOCOL = 'http' -META_USE_SITES = True - -MIGRATION_MODULES = { - 'cms': 'cms.migrations', - 'filer': 'filer.migrations_django', - 'menus': 'menus.migrations_django', - 'djangocms_flash': 'djangocms_flash.migrations_django', - 'djangocms_googlemap': 'djangocms_googlemap.migrations_django', - 'djangocms_inherit': 'djangocms_inherit.migrations_django', - 'djangocms_link': 'djangocms_link.migrations_django', - 'djangocms_snippet': 'djangocms_snippet.migrations_django', - 'djangocms_teaser': 'djangocms_teaser.migrations_django', - 'djangocms_column': 'djangocms_column.migrations_django', - 'djangocms_flash': 'djangocms_flash.migrations_django', - 'djangocms_googlemap': 'djangocms_googlemap.migrations_django', - 'djangocms_inherit': 'djangocms_inherit.migrations_django', - 'djangocms_style': 'djangocms_style.migrations_django', - 'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django', - 'cmsplugin_filer_file': 'cmsplugin_filer_file.migrations_django', - 'cmsplugin_filer_folder': 'cmsplugin_filer_folder.migrations_django', - 'cmsplugin_filer_link': 'cmsplugin_filer_link.migrations_django', - 'cmsplugin_filer_teaser': 'cmsplugin_filer_teaser.migrations_django', - 'cmsplugin_filer_utils': 'cmsplugin_filer_utils.migrations_django', - 'cmsplugin_filer_video': 'cmsplugin_filer_video.migrations_django', - 'djangocms_text_ckeditor': 'djangocms_text_ckeditor.migrations', -} - -STATICFILES_FINDERS = ( - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - 'compressor.finders.CompressorFinder', -) - -COMPRESS_PRECOMPILERS = ( - ('text/less', 'lesscpy {infile}'), -) - -THUMBNAIL_PROCESSORS = ( - 'easy_thumbnails.processors.colorspace', - 'easy_thumbnails.processors.autocrop', - 'filer.thumbnail_processors.scale_and_crop_with_subject_location', - 'easy_thumbnails.processors.filters', -) - -# django-cms-text-ckeditor -TEXT_SAVE_IMAGE_FUNCTION = ( - 'cmsplugin_filer_image.integrations.ckeditor.create_image_plugin' -) -TEXT_ADDITIONAL_TAGS = ('iframe',) -TEXT_ADDITIONAL_ATTRIBUTES = ('scrolling', 'allowfullscreen', 'frameborder') -USE_X_FORWARDED_HOST = True - -# Django Bootstrap - Settings -# Added Configuration for bootstrap static files to load over https. -BOOTSTRAP3 = { - - # The URL to the jQuery JavaScript file - 'jquery_url': '//code.jquery.com/jquery.min.js', - - # The Bootstrap base URL - 'base_url': '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/', - - # The complete URL to the Bootstrap CSS file - # (None means derive it from base_url) - 'css_url': None, - - # The complete URL to the Bootstrap CSS file (None means no theme) - 'theme_url': None, - - # The complete URL to the Bootstrap JavaScript file - # (None means derive it from base_url) - 'javascript_url': None, - - # Put JavaScript in the HEAD section of the HTML document - # (only relevant if you use bootstrap3.html) - 'javascript_in_head': False, - - # Include jQuery with Bootstrap JavaScript - # (affects django-bootstrap3 template tags) - 'include_jquery': False, - - # Label class to use in horizontal forms - 'horizontal_label_class': 'col-md-3', - - # Field class to use in horizontal forms - 'horizontal_field_class': 'col-md-9', - - # Set HTML required attribute on required fields - 'set_required': True, - - # Set HTML disabled attribute on disabled fields - 'set_disabled': False, - - # Set placeholder attributes to label if no placeholder is provided - 'set_placeholder': True, - - # Class to indicate required (better to set this in your Django form) - 'required_css_class': '', - - # Class to indicate error (better to set this in your Django form) - 'error_css_class': 'has-error', - - # Class to indicate success, meaning the field has valid input - # (better to set this in your Django form) - 'success_css_class': 'has-success', - - # Renderers (only set these if you have studied the source and understand - # the inner workings) - 'formset_renderers': { - 'default': 'bootstrap3.renderers.FormsetRenderer', - }, - 'form_renderers': { - 'default': 'bootstrap3.renderers.FormRenderer', - }, - 'field_renderers': { - 'default': 'bootstrap3.renderers.FieldRenderer', - 'inline': 'bootstrap3.renderers.InlineFieldRenderer', - }, -} - -# djangocms_blog config - -BLOG_ENABLE_COMMENTS = False -BLOG_USE_PLACEHOLDER = True -BLOG_IMAGE_THUMBNAIL_SIZE = {'size': '120x120', 'crop': True, 'upscale': False} -BLOG_IMAGE_FULL_SIZE = {'size': '640x120', 'crop': True, 'upscale': False} -BLOG_PAGINATION = 4 -BLOG_LATEST_POSTS = BLOG_PAGINATION -BLOG_POSTS_LIST_TRUNCWORDS_COUNT = 100 -BLOG_MULTISITE = True -BLOG_AUTHOR_DEFAULT = True - -# django-meta -META_SITE_PROTOCOL = "https" -META_SITE_DOMAIN = "ungleich.ch" -META_SITE_TYPE = "website" -META_SITE_NAME = "ungleich" -META_INCLUDE_KEYWORDS = ["ungleich", "hosting", "switzerland", - "Schweiz", "Swiss", "cdist"] -META_USE_SITES = True - -PARLER_LANGUAGES = {1: ({'code': 'en-us'}, {'code': 'de'}, )} diff --git a/dynamicweb/settings/base.py.orig b/dynamicweb/settings/base.py.orig deleted file mode 100644 index 6e659f6a..00000000 --- a/dynamicweb/settings/base.py.orig +++ /dev/null @@ -1,441 +0,0 @@ -""" -Copyright 2015 ungleich. -""" - -# -*- coding: utf-8 -*- -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -import os - -from django.utils.translation import ugettext_lazy as _ - -# dotenv -import dotenv - -gettext = lambda s: s - - -def env(env_name): - return os.environ.get(env_name) - - -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -PROJECT_DIR = os.path.abspath( - os.path.join(os.path.dirname(__file__), "../.."), -) - -# load .env file -dotenv.read_dotenv("{0}/.env".format(PROJECT_DIR)) - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ - -SITE_ID = 1 - -APP_ROOT_ENDPOINT = "/" - -LOGIN_URL = None -LOGOUT_URL = None -LOGIN_REDIRECT_URL = None - -EMAIL_HOST = "localhost" -EMAIL_PORT = 25 - -SECRET_KEY = env('DJANGO_SECRET_KEY') - -# Application definition - -INSTALLED_APPS = ( - #1st migrate - 'membership', - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'django.contrib.sites', - 'easy_thumbnails', - 'mptt', - 'parler', - 'taggit', - 'taggit_autosuggest', - 'django_select2', - 'meta', - 'meta_mixin', -# 'admin_enhancer', - 'djangocms_blog', - 'bootstrap3', - 'compressor', - 'filer', - 'djangocms_blog', - 'cms', # django CMS itself - 'treebeard', # utilities for implementing a tree - 'sekizai', # for javascript and css management - 'menus', # helper for model independent hierarchical website navigation - 'cmsplugin_filer_image', - - #2nd migrate - # django-cms plugins - 'djangocms_file', - 'djangocms_picture', - 'djangocms_video', - 'djangocms_flash', - - 'djangocms_googlemap', - 'djangocms_inherit', - 'djangocms_link', - 'djangocms_teaser', - 'djangocms_page_meta', - 'djangocms_text_ckeditor', - 'djangocms_admin_style', - 'cmsplugin_filer_file', - 'cmsplugin_filer_folder', - 'cmsplugin_filer_link', - 'cmsplugin_filer_teaser', - 'cmsplugin_filer_video', - # - #blog - # versioning - 'reversion', - # ungleich - 'ungleich', - 'hosting', - 'digitalglarus', - 'django_extensions', - 'debug_toolbar' -) - -MIDDLEWARE_CLASSES = ( - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.middleware.locale.LocaleMiddleware', - # django-cms middlewares - 'cms.middleware.user.CurrentUserMiddleware', - 'cms.middleware.page.CurrentPageMiddleware', - 'cms.middleware.toolbar.ToolbarMiddleware', - 'cms.middleware.language.LanguageCookieMiddleware', -) - -ROOT_URLCONF = 'dynamicweb.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [ - os.path.join(PROJECT_DIR, 'membership/'), # membership template - os.path.join(PROJECT_DIR, 'templates/'), - os.path.join(PROJECT_DIR, 'templates/digitalglarus/partials'), - os.path.join(PROJECT_DIR, 'templates/cms'), - os.path.join(PROJECT_DIR, 'templates/digitalglarus'), - ], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - "django.core.context_processors.media", - "django.core.context_processors.static", - "django.core.context_processors.tz", - "django.contrib.messages.context_processors.messages", - 'sekizai.context_processors.sekizai', - 'cms.context_processors.cms_settings', - ], - }, - }, -] - -WSGI_APPLICATION = 'dynamicweb.wsgi.application' - -TDIR = os.path.join(PROJECT_DIR, 'templates') - -CMS_TEMPLATES_DIR = { - 1: os.path.join(TDIR, '') -} - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'app', - } -} - -# Internationalization -# https://docs.djangoproject.com/en/1.7/topics/i18n/ - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_L10N = True - -USE_TZ = True - -LANGUAGES = ( - ('en-us', _('English')), - ('de', _('Deutsch')), -) - -LANGUAGE_CODE = 'en-us' - -CMS_PLACEHOLDER_CONF = { - 'logo_image': { - 'name': 'Logo Image', - 'plugins': ['FilerImagePlugin'], - 'limits': { - 'global': 1, - } - }, - 'page-title': { - 'name': 'Page Title', - 'plugins': ['TextPlugin'], - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': { - 'body': 'Page Title...' - } - } - ], - 'limits': { - 'global': 1, - } - }, - 'page-subtitle': { - 'name': 'Page Subtitle', - 'inherit': 'page-title', - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': { - 'body': 'Page subtitle...' - } - } - ], - }, - 'footer_copyright': { - 'name': 'Copyright', - 'inherit': 'page-title', - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': { - 'body': 'Copyright...' - } - } - ], - }, - 'content': { - 'name': _('Content'), - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': {'body': '

'}, - }, - ] - }, - 'post_content': { - 'name': _('Content'), - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': {'body': '

'}, - }, - ] - }, -} - -CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache', - 'LOCATION': '127.0.0.1:11211', - } -} - -if LOGIN_URL is None: - LOGIN_URL = APP_ROOT_ENDPOINT + 'accounts/login/' -if LOGOUT_URL is None: - LOGOUT_URL = APP_ROOT_ENDPOINT + 'accounts/logout/' -if LOGIN_REDIRECT_URL is None: - LOGIN_REDIRECT_URL = APP_ROOT_ENDPOINT - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.7/howto/static-files/ - -STATIC_URL = '/static/' - -STATIC_ROOT = os.path.join(PROJECT_DIR, 'static') - -MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media') -MEDIA_URL = APP_ROOT_ENDPOINT + 'media/' -FILE_UPLOAD_PERMISSIONS = 0o644 - -META_SITE_PROTOCOL = 'http' -META_USE_SITES = True -MIGRATION_MODULES = { - 'cms': 'cms.migrations', - # 'filer': 'filer.migrations_django', - # 'menus': 'menus.migrations_django', - 'djangocms_flash': 'djangocms_flash.migrations_django', - 'djangocms_googlemap': 'djangocms_googlemap.migrations_django', - 'djangocms_inherit': 'djangocms_inherit.migrations_django', - 'djangocms_link': 'djangocms_link.migrations_django', - 'djangocms_teaser': 'djangocms_teaser.migrations_django', - 'djangocms_column': 'djangocms_column.migrations_django', - 'djangocms_flash': 'djangocms_flash.migrations_django', - 'djangocms_googlemap': 'djangocms_googlemap.migrations_django', - 'djangocms_inherit': 'djangocms_inherit.migrations_django', - 'djangocms_style': 'djangocms_style.migrations_django', - 'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django', - 'cmsplugin_filer_file': 'cmsplugin_filer_file.migrations_django', - 'cmsplugin_filer_folder': 'cmsplugin_filer_folder.migrations_django', - 'cmsplugin_filer_link': 'cmsplugin_filer_link.migrations_django', - 'cmsplugin_filer_teaser': 'cmsplugin_filer_teaser.migrations_django', - 'cmsplugin_filer_utils': 'cmsplugin_filer_utils.migrations_django', - 'cmsplugin_filer_video': 'cmsplugin_filer_video.migrations_django', - 'djangocms_text_ckeditor': 'djangocms_text_ckeditor.migrations', -} - -STATICFILES_FINDERS = ( - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - 'compressor.finders.CompressorFinder', -) - -#COMPRESS_PRECOMPILERS = ( -# ('text/less', 'lesscpy {infile}'), -#) - -THUMBNAIL_PROCESSORS = ( - 'easy_thumbnails.processors.colorspace', - 'easy_thumbnails.processors.autocrop', - 'filer.thumbnail_processors.scale_and_crop_with_subject_location', - 'easy_thumbnails.processors.filters', -) - -# django-cms-text-ckeditor -TEXT_SAVE_IMAGE_FUNCTION = ( - 'cmsplugin_filer_image.integrations.ckeditor.create_image_plugin' -) -TEXT_ADDITIONAL_TAGS = ('iframe',) -TEXT_ADDITIONAL_ATTRIBUTES = ('scrolling', 'allowfullscreen', 'frameborder') -USE_X_FORWARDED_HOST = True - -# Django Bootstrap - Settings -# Added Configuration for bootstrap static files to load over https. -BOOTSTRAP3 = { - - # The URL to the jQuery JavaScript file - 'jquery_url': '//code.jquery.com/jquery.min.js', - - # The Bootstrap base URL - 'base_url': '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/', - - # The complete URL to the Bootstrap CSS file - # (None means derive it from base_url) - 'css_url': None, - - # The complete URL to the Bootstrap CSS file (None means no theme) - 'theme_url': None, - - # The complete URL to the Bootstrap JavaScript file - # (None means derive it from base_url) - 'javascript_url': None, - - # Put JavaScript in the HEAD section of the HTML document - # (only relevant if you use bootstrap3.html) - 'javascript_in_head': False, - - # Include jQuery with Bootstrap JavaScript - # (affects django-bootstrap3 template tags) - 'include_jquery': False, - - # Label class to use in horizontal forms - 'horizontal_label_class': 'col-md-3', - - # Field class to use in horizontal forms - 'horizontal_field_class': 'col-md-9', - - # Set HTML required attribute on required fields - 'set_required': True, - - # Set HTML disabled attribute on disabled fields - 'set_disabled': False, - - # Set placeholder attributes to label if no placeholder is provided - 'set_placeholder': True, - - # Class to indicate required (better to set this in your Django form) - 'required_css_class': '', - - # Class to indicate error (better to set this in your Django form) - 'error_css_class': 'has-error', - - # Class to indicate success, meaning the field has valid input - # (better to set this in your Django form) - 'success_css_class': 'has-success', - - # Renderers (only set these if you have studied the source and understand - # the inner workings) - 'formset_renderers': { - 'default': 'bootstrap3.renderers.FormsetRenderer', - }, - 'form_renderers': { - 'default': 'bootstrap3.renderers.FormRenderer', - }, - 'field_renderers': { - 'default': 'bootstrap3.renderers.FieldRenderer', - 'inline': 'bootstrap3.renderers.InlineFieldRenderer', - }, -} - -# djangocms_blog config - -BLOG_ENABLE_COMMENTS = False -BLOG_USE_PLACEHOLDER = True -BLOG_IMAGE_THUMBNAIL_SIZE = {'size': '120x120', 'crop': True, 'upscale': False} -BLOG_IMAGE_FULL_SIZE = {'size': '640x120', 'crop': True, 'upscale': False} -BLOG_PAGINATION = 4 -BLOG_LATEST_POSTS = BLOG_PAGINATION -BLOG_POSTS_LIST_TRUNCWORDS_COUNT = 100 -BLOG_MULTISITE = True -BLOG_AUTHOR_DEFAULT = True - -# django-meta -META_SITE_PROTOCOL = "https" -META_SITE_DOMAIN = "ungleich.ch" -META_SITE_TYPE = "website" -META_SITE_NAME = "ungleich" -META_INCLUDE_KEYWORDS = ["ungleich", "hosting", "switzerland", - "Schweiz", "Swiss", "cdist"] -META_USE_SITES = True - -PARLER_LANGUAGES = {1: ({'code': 'en-us'}, {'code': 'de'},)} -AUTH_USER_MODEL = 'membership.CustomUser' - - -# PAYMENT - -STRIPE_API_PUBLIC_KEY = 'pk_test_uvWyHNJgVL2IB8kjfgJkGjg4' # used in frontend to call from user browser -STRIPE_API_PRIVATE_KEY = 'sk_test_uIPMdgXoRGydrcD7fkwcn7dj' # used in backend payment -STRIPE_DESCRIPTION_ON_PAYMENT = "Payment for ungleich GmbH services" - -# EMAIL MESSAGES -REGISTRATION_MESSAGE = {'subject': "Validation mail", - 'message': 'Please validate Your account under this link http://localhost:8000/en-us/validate/{}', - 'from': 'test@test.com'} - - -#dont migrate test -# SOUTH_TESTS_MIGRATE = False - -STRIPE_API_PUBLIC_KEY = 'pk_test_uvWyHNJgVL2IB8kjfgJkGjg4' # used in frontend to call from user browser -STRIPE_API_PRIVATE_KEY = 'sk_test_uIPMdgXoRGydrcD7fkwcn7dj' # used in backend payment -STRIPE_DESCRIPTION_ON_PAYMENT = "Payment for ungleich GmbH services" \ No newline at end of file diff --git a/dynamicweb/settings/prod.py b/dynamicweb/settings/prod.py index bb6577b5..4f96593f 100644 --- a/dynamicweb/settings/prod.py +++ b/dynamicweb/settings/prod.py @@ -1,12 +1,8 @@ from .base import * -ADMINS = ( - ('Nico Schottelius', 'nico.schottelius@ungleich.ch'), - ('Raul Ascencio', 'raul.ascencio@yandex.com'), - ('Web team', 'web-team@ungleich.ch') +# List of people that get admin messages +ADMINS = ( (x, x + "@ungleich.ch") for x in ["web-team"] ) -) -# ('Sanghee Kim', 'sanghee.kim@ungleich.ch'), DEBUG=False EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' @@ -17,6 +13,15 @@ REGISTRATION_MESSAGE['message'] = REGISTRATION_MESSAGE['message'].format(host='d ALLOWED_HOSTS = [ ".ungleich.ch", - "digital.glarus.ungleich.ch", + ".datacenterlight.ch", + ".rails-hosting.ch", + ".django-hosting.ch", + ".node-hosting.ch", + ".devuanhosting.ch", + ".digitalezukunft.ch", + ".ipv6onlyhosting.ch", + ".ipv6onlyhosting.com", + ".ipv6onlyhosting.net", + ".digitalglarus.ch", ".alplora.ch" ] diff --git a/hosting/locale/de/LC_MESSAGES/django.mo b/hosting/locale/de/LC_MESSAGES/django.mo index 478838b5..1a9bb493 100644 Binary files a/hosting/locale/de/LC_MESSAGES/django.mo and b/hosting/locale/de/LC_MESSAGES/django.mo differ diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index b0d0bb5e..9ee6f63c 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-01 21:03+0000\n" +"POT-Creation-Date: 2017-05-30 13:47+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -236,7 +236,6 @@ msgstr "" msgid "The %(site_name)s team" msgstr "" - #: hosting/templates/hosting/login.html:26 msgid "You haven been logged out" msgstr "Sie wurden abgmeldet" @@ -302,15 +301,14 @@ msgstr "Bestellungsübersicht" msgid "Cores" msgstr "Prozessorkerne" -#: templates/hosting/order_detail.html:54 -#: templates/hosting/virtual_machine_detail.html:82 #: hosting/templates/hosting/order_detail.html:54 #: hosting/templates/hosting/payment.html:20 #: hosting/templates/hosting/virtual_machine_detail.html:81 +#: templates/hosting/order_detail.html:54 +#: templates/hosting/virtual_machine_detail.html:82 msgid "Memory" msgstr "Arbeitsspeicher" -#: templates/hosting/order_detail.html:56 #: hosting/templates/hosting/order_detail.html:56 #: hosting/templates/hosting/payment.html:23 msgid "Disk space" @@ -442,11 +440,7 @@ msgstr "Ihre virtuelle Maschine beenden" #: templates/hosting/virtual_machine_detail.html:166 msgid "Are you sure do you want to cancel your Virtual Machine " -msgstr "" - -#: templates/hosting/virtual_machine_detail.html:166 -msgid "plan?" -msgstr "" +msgstr "Sind Sie sicher, dass Sie ihre virtuelle Maschine beenden wollen " #: templates/hosting/virtual_machine_detail.html:169 msgid "Cancel" diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 79d1ff85..35db3cd9 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -130,11 +130,15 @@ {% if request.user.is_authenticated %}
+<<<<<<< HEAD
+======= + +>>>>>>> 7b197ec75bb8eecd239988ac929315b50c50d233
{% endif %} diff --git a/hosting/templates/hosting/reset_password.html b/hosting/templates/hosting/reset_password.html index 1590a5bd..33aad944 100644 --- a/hosting/templates/hosting/reset_password.html +++ b/hosting/templates/hosting/reset_password.html @@ -10,6 +10,16 @@

{% trans "Your VM hosted in Switzerland"%}

+ + {% if messages %} +
    + {% for message in messages %} +
  • {{ message }}
  • + {% endfor %} +
+ {% endif %} + +