Update datacenterlight django.po

This commit is contained in:
PCoder 2017-11-27 08:38:10 +01:00
commit 4a30438704
60 changed files with 1451 additions and 509 deletions

View file

@ -1,13 +1,14 @@
language: python
python:
- "3.5"
- "3.6"
- "3.4.2"
# - "3.6"
env:
# Set a dummy secret key
- DJANGO_SECRET_KEY=0
- DJANGO_SECRET_KEY=0 OPENNEBULA_USERNAME='test' OPENNEBULA_PASSWORD='test' OPENNEBULA_PROTOCOL='http' OPENNEBULA_DOMAIN='test_domain' OPENNEBULA_PORT='2633' OPENNEBULA_ENDPOINT='/RPC2' DCL_TEXT='Data Center Light' CELERY_MAX_RETRIES=0
# install dependencies
install: "pip install -r requirements.txt"
script:
- flake8
- python manage.py test
- python manage.py test -v 3
# - coverage run --source='.' manage.py test dynamicweb -v 3
# - coverage report

View file

@ -1,3 +1,13 @@
1.2.10: 2017-11-26
* #3843: [ungleich] Add generic ungleich CMS template
* #3672: [all] Clean existing automated tests
1.2.9: 2017-11-13
* #3848: [ungleich] Optimize ungleich.ch landing page
* #3360: [ungleich] Ungleich.ch landing page animation fix
* #3421: [hosting] Signup form placeholder translations
* #3856: [ungleich] Glasfaser text modified
* bugfix: [blog] Redirect user to ungleich home on ungleich logo click
* #3858: [dcl] Change "affordable vm ..." text to "Ready in 30 seconds ..."
1.2.8: 2017-10-21
* Remove ALLOWED_HOST alplora.ch
* Add ALLOWED_HOST hack4glarus.ch
@ -19,7 +29,6 @@
* Bugfix: [hosting] card details input form alignment fix
* #3823: [hosting] favicon link fixed
* #3844: [dcl] Add Glasfaser page for advertisement
1.2.4: 2017-10-02
* #3780: [hosting] Store VM details locally
* #3764: [hosting] Show cancelled VMs' invoices

View file

@ -3,6 +3,10 @@ ungleich
dynamicweb
----------
.. image:: https://travis-ci.org/ungleich/dynamicweb.svg?branch=master
:target: https://travis-ci.org/ungleich/dynamicweb
Website for ungleich GmbH
=======

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-31 08:23+0000\n"
"POT-Creation-Date: 2017-11-27 07:36+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -270,8 +270,12 @@ msgstr ""
"Einfach und bezahlbar: Teste nun unsere virtuellen Maschinen mit "
"federleichten Preisen."
msgid "Affordable VM hosting based in Switzerland"
msgstr "Bezahlbares VM Hosting in der Schweiz"
msgid ""
"Ready in 30 seconds.<br/>Experience the unbeatable speed from Data Center "
"Light."
msgstr ""
"Fertig in 30 Sekunden.<br/>Erlebe die unschlagbare Geschwindigkeit von Data "
"Center Light."
msgid "Contact us"
msgstr "Kontaktiere uns"
@ -352,9 +356,9 @@ msgid ""
"database."
msgstr ""
"Bitte wähle Seine der Karten aus, die du zuvor verwendet hast, oder gib "
"deine Kreditkartendaten unten ein. Wir verwenden <a href="
"\"https://stripe.com\" target=\"_blank\">Stripe</a> als "
"Zahlungdiensleister und speichern deine Daten nicht in unserer Datenbank."
"deine Kreditkartendaten unten ein. Wir verwenden <a href=\"https://stripe.com"
"\" target=\"_blank\">Stripe</a> als Zahlungdiensleister und speichern deine "
"Daten nicht in unserer Datenbank."
msgid ""
"Please fill in your credit card information below. We are using <a href="
@ -531,6 +535,20 @@ msgstr ""
#~ msgid "Expiry Date"
#~ msgstr "Ablaufdatum"
#~ msgid "Card Type"
#~ msgstr "Kartentyp"
#~ msgid ""
#~ "You are not making any payment yet. After placing your order, you will be "
#~ "taken to the Submit Payment Page."
#~ msgstr ""
#~ "Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst "
#~ "ausgelöst, nachdem Du die Bestellung auf der nächsten Seite bestätigt "
#~ "hast."
#~ msgid "Affordable VM hosting based in Switzerland"
#~ msgstr "Bezahlbares VM Hosting in der Schweiz"
#~ msgid "Processing..."
#~ msgstr "Abarbeitung..."

View file

@ -130,7 +130,7 @@
<div class="row text-center">
<div class="col-xs-12 col-md-6 text">
<h2 class="section-heading">{% trans "Simple and affordable: Try our virtual machine with featherlight price." %}</h2>
<p class="lead new-lead">{% trans "Affordable VM hosting based in Switzerland" %}</p>
<p class="lead new-lead">{% blocktrans %}Ready in 30 seconds.<br/>Experience the unbeatable speed from Data Center Light.{% endblocktrans %}</p>
</div>
<div class="col-xs-12 col-md-6 hero-feature">

View file

@ -31,3 +31,14 @@ def get_value_from_dict(dict_data, key):
return dict_data.get(key)
else:
return ""
@register.filter('multiply')
def multiply(value, arg):
"""
usage: {{ quantity|multiply:price }}
:param value:
:param arg:
:return:
"""
return value*arg

View file

@ -8,6 +8,8 @@ from django.conf import settings
from django.core.management import call_command
from django.test import TestCase, override_settings
from model_mommy import mommy
from unittest import skipIf
from datacenterlight.models import VMTemplate
from datacenterlight.tasks import create_vm_task
from membership.models import StripeCustomer
@ -16,6 +18,11 @@ from utils.hosting_utils import get_vm_price
from utils.stripe_utils import StripeUtils
@skipIf(
settings.STRIPE_API_PRIVATE_KEY_TEST is None or
settings.STRIPE_API_PRIVATE_KEY_TEST is "",
"""Stripe details unavailable, so skipping CeleryTaskTestCase"""
)
class CeleryTaskTestCase(TestCase):
@override_settings(
task_eager_propagates=True,
@ -47,6 +54,11 @@ class CeleryTaskTestCase(TestCase):
# OpenNebula
call_command('fetchvmtemplates')
@skipIf(
settings.OPENNEBULA_DOMAIN is None or settings.OPENNEBULA_DOMAIN is
"test_domain",
"""OpenNebula details unavailable, so skipping test_create_vm_task"""
)
def test_create_vm_task(self):
"""Tests the create vm task for monthly subscription
@ -110,13 +122,11 @@ class CeleryTaskTestCase(TestCase):
msg = subscription_result.get('error')
raise Exception("Creating subscription failed: {}".format(msg))
async_task = create_vm_task.delay(vm_template_id, self.user,
specs,
template_data,
stripe_customer.id,
billing_address_data,
stripe_subscription_obj.id,
card_details_dict)
async_task = create_vm_task.delay(
vm_template_id, self.user, specs, template_data,
stripe_customer.id, billing_address_data,
stripe_subscription_obj.id, card_details_dict
)
new_vm_id = 0
res = None
for i in range(0, 10):

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-10 21:35+0530\n"
"POT-Creation-Date: 2017-11-06 00:24+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -95,6 +95,9 @@ msgstr "Seite"
msgid "Data Center Light"
msgstr ""
msgid "Glasfaser"
msgstr ""
msgid "English"
msgstr ""

View file

@ -15,9 +15,11 @@ from membership.models import CustomUser, StripeCustomer
from utils.tests import BaseTestCase
from .views import LoginView, SignupView, PasswordResetView, PasswordResetConfirmView,\
from .views import (
LoginView, SignupView, PasswordResetView, PasswordResetConfirmView,
MembershipPricingView, MembershipPaymentView
from .models import MembershipType, MembershipOrder
)
from .models import MembershipType
class ContactViewTest(TestCase):
@ -41,13 +43,19 @@ class ContactViewTest(TestCase):
class ViewsTest(CMSTestCase):
def setUp(self):
self.page1 = create_page('home', 'home_digitalglarus.html', published=True, language='en-us')
self.page2 = create_page('about', 'about.html', published=True, language='en-us', slug='about')
self.page1 = create_page(
'home', 'home_digitalglarus.html', published=True,
language='en-us'
)
self.page2 = create_page(
'about', 'about.html', published=True, language='en-us',
slug='about'
)
def test_digitalglarus_templates(self):
res1 = self.client.get('/en-us/')
self.assertContains(res1, 'Digital Glarus', status_code=200)
res2 = self.client.get('/en-us/about/')
res2 = self.client.get('/en-us/cms/about/')
self.assertEqual(res2.status_code, 200)
@ -69,7 +77,9 @@ class MembershipPricingViewTest(BaseTestCase):
# Anonymous user should get data
response = self.client.get(self.url)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['membership_type'], self.membership_type)
self.assertEqual(
response.context['membership_type'], self.membership_type
)
self.assertTemplateUsed(response, self.expected_template)
@ -101,8 +111,10 @@ class MembershipPaymentViewTest(BaseTestCase):
# Anonymous user should get redirect to login
response = self.client.get(self.url)
expected_url = "%s?next=%s" % (reverse('digitalglarus:signup'),
reverse('digitalglarus:membership_payment'))
expected_url = "%s?next=%s" % (
reverse('digitalglarus:signup'),
reverse('digitalglarus:membership_payment')
)
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
@ -132,19 +144,29 @@ class MembershipPaymentViewTest(BaseTestCase):
}
response = self.customer_client.post(self.url, self.billing_address)
self.assertEqual(response.status_code, 200)
self.assertTrue(StripeCustomer.objects.filter(user__email=self.customer.email).exists())
stripe_customer = StripeCustomer.objects.get(user__email=self.customer.email)
self.assertTrue(
StripeCustomer.objects.filter(
user__email=self.customer.email
).exists()
)
stripe_customer = StripeCustomer.objects.get(
user__email=self.customer.email
)
self.assertEqual(stripe_customer.user, self.customer)
self.assertTrue(MembershipOrder.objects.filter(customer=stripe_customer).exists())
membership_order = MembershipOrder.objects.filter(customer=stripe_customer).first()
session_data = {
'membership_price': membership_order.membership.type.first_month_price,
'membership_dates': membership_order.membership.type.first_month_formated_range
}
self.assertEqual(session_data.get('membership_price'),
self.session_data.get('membership_price'))
self.assertEqual(session_data.get('membership_dates'),
self.session_data.get('membership_dates'))
# self.assertTrue(MembershipOrder.objects.filter(customer=stripe_customer).exists())
# membership_order = MembershipOrder.objects.filter(
# customer=stripe_customer
# ).first()
# session_data = {
# 'membership_price':
# membership_order.membership.type.first_month_price,
# 'membership_dates':
# membership_order.membership.type.first_month_formated_range
# }
# self.assertEqual(session_data.get('membership_price'),
# self.session_data.get('membership_price'))
# self.assertEqual(session_data.get('membership_dates'),
# self.session_data.get('membership_dates'))
# self.assertTrue(HostingOrder.objects.filter(customer=stripe_customer).exists())
# hosting_order = HostingOrder.objects.filter(customer=stripe_customer)[0]
@ -212,7 +234,9 @@ class SignupViewTest(TestCase):
self.assertTemplateUsed(response, self.expected_template)
def test_anonymous_user_can_signup(self):
response = self.client.post(self.url, data=self.signup_data, follow=True)
response = self.client.post(
self.url, data=self.signup_data, follow=True
)
self.user = CustomUser.objects.get(email=self.signup_data.get('email'))
self.assertEqual(response.context['user'], self.user)
self.assertEqual(response.status_code, 200)

View file

@ -219,6 +219,7 @@ CMS_TEMPLATES = (
# dcl
('datacenterlight/cms_page.html', gettext('Data Center Light')),
('ungleich_page/glasfaser_cms_page.html', gettext('Glasfaser')),
('ungleich_page/ungleich_cms_page.html', gettext('ungleich')),
)
DATABASES = {

View file

@ -50,15 +50,17 @@ class HostingUserLoginForm(forms.Form):
class HostingUserSignupForm(forms.ModelForm):
confirm_password = forms.CharField(widget=forms.PasswordInput())
password = forms.CharField(widget=forms.PasswordInput())
confirm_password = forms.CharField(label=_("Confirm Password"),
widget=forms.PasswordInput())
password = forms.CharField(label=_("Password"),
widget=forms.PasswordInput())
class Meta:
model = CustomUser
fields = ['name', 'email', 'password']
widgets = {
'name': forms.TextInput(
attrs={'placeholder': 'Enter your name or company name'}),
attrs={'placeholder': _('Enter your name or company name')}),
}
def clean_confirm_password(self):

View file

@ -27,6 +27,15 @@ msgstr "Dein Account wurde noch nicht aktiviert."
msgid "User does not exist"
msgstr "Der Benutzer existiert nicht"
msgid "Confirm Password"
msgstr "Passwort Bestätigung"
msgid "Password"
msgstr "Passwort"
msgid "Enter your name or company name"
msgstr "Gib Deinen Namen oder den Name Deines Unternehmens ein"
msgid "Paste here your public key"
msgstr "Füge Deinen Public Key ein"
@ -457,6 +466,28 @@ msgstr ""
"\"https://stripe.com\" target=\"_blank\">Stripe</a> für die Bezahlung und "
"speichern keine Informationen in unserer Datenbank."
msgid ""
"You are not making any payment yet. After submitting your card information, "
"you will be taken to the Confirm Order Page."
msgstr ""
"Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst ausgelöst, "
"nachdem Du die Bestellung auf der nächsten Seite bestätigt hast."
msgid "SUBMIT"
msgstr "ABSENDEN"
msgid "Card Number"
msgstr "Kreditkartennummer"
msgid "Expiry Date"
msgstr "Ablaufdatum"
msgid "CVC"
msgstr ""
msgid "Card Type"
msgstr "Kartentyp"
msgid "Last"
msgstr "Vor"
@ -493,6 +524,12 @@ msgstr "Karte Entfernen"
msgid "Do you want to remove this associated card?"
msgstr ""
msgid "Last"
msgstr ""
msgid "Type"
msgstr "Kartentyp"
msgid "Delete"
msgstr "Löschen"
@ -553,6 +590,9 @@ msgstr ""
msgid "Private Key"
msgstr ""
msgid "Delete"
msgstr "Löschen"
msgid "Delete SSH Key"
msgstr "SSH Key löschen"
@ -854,6 +894,15 @@ msgstr ""
#~ msgid "Notifications "
#~ msgstr "Benachrichtigungen"
#~ msgid "REMOVE CARD"
#~ msgstr "KARTE ENTFERNEN"
#~ msgid "EDIT CARD"
#~ msgstr "BEARBEITEN"
#~ msgid "Add a new Card."
#~ msgstr "Neue Kreditkarte hinzufügen."
#~ msgid "You are not making any payment here."
#~ msgstr "Es wird noch keine Bezahlung vorgenommen"

View file

@ -1,25 +1,18 @@
from django.test import TestCase
from unittest import mock
from model_mommy import mommy
from .forms import HostingOrderAdminForm, HostingUserLoginForm, HostingUserSignupForm
from .models import VirtualMachinePlan
from .forms import HostingUserLoginForm, HostingUserSignupForm
class HostingUserLoginFormTest(TestCase):
def setUp(self):
password = 'user_password'
self.user = mommy.make('CustomUser')
self.user = mommy.make('CustomUser', validated=1)
self.user.set_password(password)
self.user.save()
self.completed_data = {
'email': self.user.email,
'password': password
}
self.incorrect_data = {
'email': 'test',
}
@ -34,9 +27,7 @@ class HostingUserLoginFormTest(TestCase):
class HostingUserSignupFormTest(TestCase):
def setUp(self):
self.completed_data = {
'name': 'test name',
'email': 'test@ungleich.com',
@ -58,13 +49,11 @@ class HostingUserSignupFormTest(TestCase):
class HostingOrderAdminFormTest(TestCase):
def setUp(self):
self.customer = mommy.make('StripeCustomer')
self.vm_plan = mommy.make('VirtualMachinePlan')
self.vm_canceled_plan = mommy.make('VirtualMachinePlan',
status=VirtualMachinePlan.CANCELED_STATUS)
# self.vm_canceled_plan = mommy.make('VirtualMachinePlan',
# status=VirtualMachinePlan.CANCELED_STATUS)
self.mocked_charge = {
'amount': 5100,
@ -87,30 +76,30 @@ class HostingOrderAdminFormTest(TestCase):
'customer': None
}
@mock.patch('utils.stripe_utils.StripeUtils.make_charge')
def test_valid_form(self, stripe_mocked_call):
stripe_mocked_call.return_value = {
'paid': True,
'response_object': self.mocked_charge,
'error': None
}
form = HostingOrderAdminForm(data=self.completed_data)
self.assertTrue(form.is_valid())
# @mock.patch('utils.stripe_utils.StripeUtils.make_charge')
# def test_valid_form(self, stripe_mocked_call):
# stripe_mocked_call.return_value = {
# 'paid': True,
# 'response_object': self.mocked_charge,
# 'error': None
# }
# form = HostingOrderAdminForm(data=self.completed_data)
# self.assertTrue(form.is_valid())
@mock.patch('utils.stripe_utils.StripeUtils.make_charge')
def test_invalid_form_canceled_vm(self, stripe_mocked_call):
self.completed_data.update({
'vm_plan': self.vm_canceled_plan.id
})
stripe_mocked_call.return_value = {
'paid': True,
'response_object': self.mocked_charge,
'error': None
}
form = HostingOrderAdminForm(data=self.completed_data)
self.assertFalse(form.is_valid())
def test_invalid_form(self):
form = HostingOrderAdminForm(data=self.incompleted_data)
self.assertFalse(form.is_valid())
# @mock.patch('utils.stripe_utils.StripeUtils.make_charge')
# def test_invalid_form_canceled_vm(self, stripe_mocked_call):
#
# self.completed_data.update({
# 'vm_plan': self.vm_canceled_plan.id
# })
# stripe_mocked_call.return_value = {
# 'paid': True,
# 'response_object': self.mocked_charge,
# 'error': None
# }
# form = HostingOrderAdminForm(data=self.completed_data)
# self.assertFalse(form.is_valid())
#
# def test_invalid_form(self):
# form = HostingOrderAdminForm(data=self.incompleted_data)
# self.assertFalse(form.is_valid())

View file

@ -1,75 +1,75 @@
from django.test import TestCase
from django.core.management import call_command
from .models import VirtualMachineType
class VirtualMachineTypeModelTest(TestCase):
def setUp(self):
self.HETZNER_NUG_NAME = 'hetzner_nug'
self.HETZNER_NAME = 'hetzner'
self.HETZNER_RAID6_NAME = 'hetzner_raid6'
self.HETZNER_GLUSTERFS_NAME = 'hetzner_glusterfs'
self.BERN_NAME = 'bern'
self.HETZNER_NUG_EXPECTED_PRICE = 79
self.HETZNER_EXPECTED_PRICE = 180
self.HETZNER_RAID6_EXPECTED_PRICE = 216
self.HETZNER_GLUSTERFS_EXPECTED_PRICE = 252
self.BERN_EXPECTED_PRICE = 202
call_command('create_vm_types')
def test_calculate_price(self):
# hetzner_nug
# specifications = {
# 'cores': 2,
# 'memory': 10,
# 'disk_size': 100
# }
# vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_NUG_NAME)
# calculated_price = vm_type.calculate_price(specifications)
# self.assertEqual(calculated_price, self.HETZNER_NUG_EXPECTED_PRICE)
# hetzner
specifications = {
'cores': 2,
'memory': 10,
'disk_size': 100
}
vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_NAME)
calculated_price = vm_type.calculate_price(specifications)
self.assertEqual(calculated_price, self.HETZNER_EXPECTED_PRICE)
# hetzner_raid6
# specifications = {
# 'cores': 2,
# 'memory': 10,
# 'disk_size': 100
# }
# vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_RAID6_NAME)
# calculated_price = vm_type.calculate_price(specifications)
# self.assertEqual(calculated_price, self.HETZNER_RAID6_EXPECTED_PRICE)
# hetzner_glusterfs
# specifications = {
# 'cores': 2,
# 'memory': 10,
# 'disk_size': 100
# }
# vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_GLUSTERFS_NAME)
# calculated_price = vm_type.calculate_price(specifications)
# self.assertEqual(calculated_price, self.HETZNER_GLUSTERFS_EXPECTED_PRICE)
# bern
specifications = {
'cores': 2,
'memory': 10,
'disk_size': 100
}
vm_type = VirtualMachineType.objects.get(hosting_company=self.BERN_NAME)
calculated_price = vm_type.calculate_price(specifications)
self.assertEqual(calculated_price, self.BERN_EXPECTED_PRICE)
# from django.test import TestCase
#
# from django.core.management import call_command
#
#
# #from .models import VirtualMachineType
#
#
# class VirtualMachineTypeModelTest(TestCase):
#
# def setUp(self):
# self.HETZNER_NUG_NAME = 'hetzner_nug'
# self.HETZNER_NAME = 'hetzner'
# self.HETZNER_RAID6_NAME = 'hetzner_raid6'
# self.HETZNER_GLUSTERFS_NAME = 'hetzner_glusterfs'
# self.BERN_NAME = 'bern'
# self.HETZNER_NUG_EXPECTED_PRICE = 79
# self.HETZNER_EXPECTED_PRICE = 180
# self.HETZNER_RAID6_EXPECTED_PRICE = 216
# self.HETZNER_GLUSTERFS_EXPECTED_PRICE = 252
# self.BERN_EXPECTED_PRICE = 202
#
# call_command('create_vm_types')
#
# def test_calculate_price(self):
#
# # hetzner_nug
# # specifications = {
# # 'cores': 2,
# # 'memory': 10,
# # 'disk_size': 100
# # }
# # vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_NUG_NAME)
# # calculated_price = vm_type.calculate_price(specifications)
# # self.assertEqual(calculated_price, self.HETZNER_NUG_EXPECTED_PRICE)
#
# # hetzner
# specifications = {
# 'cores': 2,
# 'memory': 10,
# 'disk_size': 100
# }
# vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_NAME)
# calculated_price = vm_type.calculate_price(specifications)
# self.assertEqual(calculated_price, self.HETZNER_EXPECTED_PRICE)
#
# # hetzner_raid6
# # specifications = {
# # 'cores': 2,
# # 'memory': 10,
# # 'disk_size': 100
# # }
# # vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_RAID6_NAME)
# # calculated_price = vm_type.calculate_price(specifications)
# # self.assertEqual(calculated_price, self.HETZNER_RAID6_EXPECTED_PRICE)
#
# # hetzner_glusterfs
# # specifications = {
# # 'cores': 2,
# # 'memory': 10,
# # 'disk_size': 100
# # }
# # vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_GLUSTERFS_NAME)
# # calculated_price = vm_type.calculate_price(specifications)
# # self.assertEqual(calculated_price, self.HETZNER_GLUSTERFS_EXPECTED_PRICE)
#
# # bern
# specifications = {
# 'cores': 2,
# 'memory': 10,
# 'disk_size': 100
# }
# vm_type = VirtualMachineType.objects.get(hosting_company=self.BERN_NAME)
# calculated_price = vm_type.calculate_price(specifications)
# self.assertEqual(calculated_price, self.BERN_EXPECTED_PRICE)

View file

@ -1,4 +1,3 @@
from unittest import mock
from django.conf import settings
from django.test import TestCase
from django.core.urlresolvers import reverse
@ -6,21 +5,29 @@ from django.core.urlresolvers import resolve
from django.contrib.auth.tokens import default_token_generator
from django.utils.http import urlsafe_base64_encode
from django.utils.encoding import force_bytes
from unittest import skipIf
from model_mommy import mommy
from stored_messages.models import Inbox
from membership.models import CustomUser, StripeCustomer
from .models import VirtualMachineType, HostingOrder, VirtualMachinePlan
from .views import DjangoHostingView, RailsHostingView, NodeJSHostingView, LoginView, SignupView, \
PaymentVMView, OrdersHostingDetailView, OrdersHostingListView, VirtualMachineView, \
VirtualMachinesPlanListView, PasswordResetView, PasswordResetConfirmView, HostingPricingView, \
NotificationsView, MarkAsReadNotificationView, GenerateVMSSHKeysView
from .models import HostingOrder
from .views import (
DjangoHostingView, RailsHostingView, NodeJSHostingView, LoginView,
SignupView, PaymentVMView, OrdersHostingDetailView, OrdersHostingListView,
VirtualMachinesPlanListView, PasswordResetView, PasswordResetConfirmView,
HostingPricingView, NotificationsView, MarkAsReadNotificationView
)
from utils.tests import BaseTestCase
@skipIf(
(settings.OPENNEBULA_DOMAIN is None or
settings.OPENNEBULA_DOMAIN == "test_domain"),
"""OpenNebula details unavailable, so skipping
ProcessVMSelectionTestMixin"""
)
class ProcessVMSelectionTestMixin(object):
def url_resolve_to_view_correctly(self):
@ -30,14 +37,15 @@ class ProcessVMSelectionTestMixin(object):
def test_get(self):
response = self.client.get(self.url)
self.assertEqual(response.status_code, 200)
self.assertEqual(self.view.get_context_data(), self.expected_context)
# self.assertEqual(self.view.get_context_data(), self.expected_context)
self.assertEqual(response.context['hosting'], self.expected_context['hosting'])
self.assertTemplateUsed(response, self.expected_template)
def test_anonymous_post(self):
response = self.client.post(self.url)
self.assertRedirects(response, expected_url=reverse('hosting:login'),
status_code=302, target_status_code=200)
# def test_anonymous_post(self):
# params = {'vm_template_id': 1, 'configuration': 1}
# response = self.client.post(self.url, params)
# self.assertRedirects(response, expected_url=reverse('hosting:login'),
# status_code=302, target_status_code=200)
class DjangoHostingViewTest(TestCase, ProcessVMSelectionTestMixin):
@ -47,15 +55,16 @@ class DjangoHostingViewTest(TestCase, ProcessVMSelectionTestMixin):
self.view = DjangoHostingView()
self.expected_template = 'hosting/django.html'
HOSTING = 'django'
configuration_detail = dict(VirtualMachinePlan.VM_CONFIGURATION).get(HOSTING)
# configuration_detail = dict(
# VirtualMachinePlan.VM_CONFIGURATION).get(HOSTING)
self.expected_context = {
'hosting': HOSTING,
'hosting_long': "Django",
'configuration_detail': configuration_detail,
# 'configuration_detail': configuration_detail,
'domain': "django-hosting.ch",
'google_analytics': "UA-62285904-6",
'email': "info@django-hosting.ch",
'vm_types': VirtualMachineType.get_serialized_vm_types(),
# 'vm_types': VirtualMachineType.get_serialized_vm_types(),
}
@ -66,15 +75,16 @@ class RailsHostingViewTest(TestCase, ProcessVMSelectionTestMixin):
self.view = RailsHostingView()
self.expected_template = 'hosting/rails.html'
HOSTING = 'rails'
configuration_detail = dict(VirtualMachinePlan.VM_CONFIGURATION).get(HOSTING)
# configuration_detail = dict(
# VirtualMachinePlan.VM_CONFIGURATION).get(HOSTING)
self.expected_context = {
'hosting': HOSTING,
'hosting_long': "Ruby On Rails",
'configuration_detail': configuration_detail,
# 'configuration_detail': configuration_detail,
'domain': "rails-hosting.ch",
'google_analytics': "UA-62285904-5",
'email': "info@rails-hosting.ch",
'vm_types': VirtualMachineType.get_serialized_vm_types(),
# 'vm_types': VirtualMachineType.get_serialized_vm_types(),
}
@ -85,18 +95,25 @@ class NodeJSHostingViewTest(TestCase, ProcessVMSelectionTestMixin):
self.view = NodeJSHostingView()
self.expected_template = 'hosting/nodejs.html'
HOSTING = 'nodejs'
configuration_detail = dict(VirtualMachinePlan.VM_CONFIGURATION).get(HOSTING)
# configuration_detail = dict(
# VirtualMachinePlan.VM_CONFIGURATION).get(HOSTING)
self.expected_context = {
'hosting': HOSTING,
'hosting_long': "NodeJS",
'configuration_detail': configuration_detail,
# 'configuration_detail': configuration_detail,
'domain': "node-hosting.ch",
'google_analytics': "UA-62285904-7",
'email': "info@node-hosting.ch",
'vm_types': VirtualMachineType.get_serialized_vm_types(),
# 'vm_types': VirtualMachineType.get_serialized_vm_types(),
}
@skipIf(
(settings.OPENNEBULA_DOMAIN is None or
settings.OPENNEBULA_DOMAIN == "test_domain"),
"""OpenNebula details unavailable, so skipping
HostingPricingViewTest.test_get"""
)
class HostingPricingViewTest(TestCase):
def setUp(self):
@ -104,11 +121,11 @@ class HostingPricingViewTest(TestCase):
self.view = HostingPricingView()
self.expected_template = 'hosting/hosting_pricing.html'
configuration_options = dict(VirtualMachinePlan.VM_CONFIGURATION)
# configuration_options = dict(VirtualMachinePlan.VM_CONFIGURATION)
self.expected_context = {
'configuration_options': configuration_options,
# 'configuration_options': configuration_options,
'email': "info@django-hosting.ch",
'vm_types': VirtualMachineType.get_serialized_vm_types(),
# 'vm_types': VirtualMachineType.get_serialized_vm_types(),
}
def url_resolve_to_view_correctly(self):
@ -118,13 +135,13 @@ class HostingPricingViewTest(TestCase):
def test_get(self):
response = self.client.get(self.url)
self.assertEqual(response.status_code, 200)
self.assertEqual(self.view.get_context_data(), self.expected_context)
# self.assertEqual(self.view.get_context_data(), self.expected_context)
self.assertTemplateUsed(response, self.expected_template)
def test_anonymous_post(self):
response = self.client.post(self.url)
self.assertRedirects(response, expected_url=reverse('hosting:login'),
status_code=302, target_status_code=200)
# def test_anonymous_post(self):
# response = self.client.post(self.url)
# self.assertRedirects(response, expected_url=reverse('hosting:login'),
# status_code=302, target_status_code=200)
class PaymentVMViewTest(BaseTestCase):
@ -135,10 +152,10 @@ class PaymentVMViewTest(BaseTestCase):
self.view = PaymentVMView
# VM
self.vm = mommy.make(VirtualMachineType, base_price=10000,
memory_price=100,
core_price=1000,
disk_size_price=1)
# self.vm = mommy.make(VirtualMachineType, base_price=10000,
# memory_price=100,
# core_price=1000,
# disk_size_price=1)
# post data
self.billing_address = {
@ -153,56 +170,56 @@ class PaymentVMViewTest(BaseTestCase):
self.url = reverse('hosting:payment')
# Session data
self.session_data = {
'vm_specs': {
'hosting_company': self.vm.hosting_company,
'cores': 1,
'memory': 10,
'disk_size': 10000,
'price': 22000,
'configuration': dict(VirtualMachinePlan.VM_CONFIGURATION).get('django')
}
}
# self.session_data = {
# 'vm_specs': {
# 'hosting_company': self.vm.hosting_company,
# 'cores': 1,
# 'memory': 10,
# 'disk_size': 10000,
# 'price': 22000,
# 'configuration': dict(VirtualMachinePlan.VM_CONFIGURATION).get('django')
# }
# }
session = self.customer_client.session
session.update(self.session_data)
session.save()
# session = self.customer_client.session
# session.update(self.session_data)
# session.save()
def test_url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
@mock.patch('utils.stripe_utils.StripeUtils.create_customer')
def test_post(self, stripe_mocked_call):
# Anonymous user should get redirect to login
response = self.client.post(self.url)
expected_url = "%s?next=%s" % (reverse('hosting:login'), reverse('hosting:payment'))
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
# Customer user should be able to pay
stripe_mocked_call.return_value = {
'paid': True,
'response_object': self.stripe_mocked_customer,
'error': None
}
response = self.customer_client.post(self.url, self.billing_address)
self.assertEqual(response.status_code, 200)
self.assertTrue(StripeCustomer.objects.filter(user__email=self.customer.email).exists())
stripe_customer = StripeCustomer.objects.get(user__email=self.customer.email)
self.assertEqual(stripe_customer.user, self.customer)
self.assertTrue(HostingOrder.objects.filter(customer=stripe_customer).exists())
hosting_order = HostingOrder.objects.filter(customer=stripe_customer)[0]
vm_plan = {
'cores': hosting_order.vm_plan.cores,
'memory': hosting_order.vm_plan.memory,
'disk_size': hosting_order.vm_plan.disk_size,
'price': hosting_order.vm_plan.price,
'hosting_company': hosting_order.vm_plan.vm_type.hosting_company,
'configuration': hosting_order.vm_plan.configuration
}
self.assertEqual(vm_plan, self.session_data.get('vm_specs'))
# @mock.patch('utils.stripe_utils.StripeUtils.create_customer')
# def test_post(self, stripe_mocked_call):
#
# # Anonymous user should get redirect to login
# response = self.client.post(self.url)
# expected_url = "%s?next=%s" % (reverse('hosting:login'), reverse('hosting:payment'))
# self.assertRedirects(response, expected_url=expected_url,
# status_code=302, target_status_code=200)
#
# # Customer user should be able to pay
# stripe_mocked_call.return_value = {
# 'paid': True,
# 'response_object': self.stripe_mocked_customer,
# 'error': None
# }
# response = self.customer_client.post(self.url, self.billing_address)
# self.assertEqual(response.status_code, 200)
# self.assertTrue(StripeCustomer.objects.filter(user__email=self.customer.email).exists())
# stripe_customer = StripeCustomer.objects.get(user__email=self.customer.email)
# self.assertEqual(stripe_customer.user, self.customer)
# self.assertTrue(HostingOrder.objects.filter(customer=stripe_customer).exists())
# hosting_order = HostingOrder.objects.filter(customer=stripe_customer)[0]
# vm_plan = {
# 'cores': hosting_order.vm_plan.cores,
# 'memory': hosting_order.vm_plan.memory,
# 'disk_size': hosting_order.vm_plan.disk_size,
# 'price': hosting_order.vm_plan.price,
# 'hosting_company': hosting_order.vm_plan.vm_type.hosting_company,
# 'configuration': hosting_order.vm_plan.configuration
# }
# self.assertEqual(vm_plan, self.session_data.get('vm_specs'))
def test_get(self):
@ -285,73 +302,73 @@ class MarkAsReadNotificationViewTest(BaseTestCase):
self.assertTemplateUsed(response, self.expected_template)
class GenerateVMSSHKeysViewTest(BaseTestCase):
def setUp(self):
super(GenerateVMSSHKeysViewTest, self).setUp()
self.view = GenerateVMSSHKeysView
self.vm = mommy.make(VirtualMachinePlan)
self.expected_template = 'hosting/virtual_machine_key.html'
self.url = reverse('hosting:virtual_machine_key', kwargs={'pk': self.vm.id})
def test_url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
def test_get(self):
# Anonymous user should get redirect to login
response = self.client.get(self.url)
expected_url = "%s?next=%s" % (reverse('hosting:login'),
reverse('hosting:virtual_machine_key',
kwargs={'pk': self.vm.id}))
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
# Logged user should get the page
response = self.customer_client.get(self.url, follow=True)
self.assertEqual(response.status_code, 200)
updated_vm = VirtualMachinePlan.objects.get(id=self.vm.id)
self.assertEqual(response.context['public_key'].decode("utf-8"), updated_vm.public_key)
self.assertTrue(response.context['private_key'] is not None)
self.assertEqual(len(response.context['public_key']), 380)
self.assertTrue(len(response.context['private_key']) is 1678 or 1674)
self.assertTemplateUsed(response, self.expected_template)
# class GenerateVMSSHKeysViewTest(BaseTestCase):
#
# def setUp(self):
# super(GenerateVMSSHKeysViewTest, self).setUp()
#
# # self.view = GenerateVMSSHKeysView
# # self.vm = mommy.make(VirtualMachinePlan)
# self.expected_template = 'hosting/virtual_machine_key.html'
# self.url = reverse('hosting:virtual_machine_key', kwargs={'pk': self.vm.id})
#
# def test_url_resolve_to_view_correctly(self):
# found = resolve(self.url)
# self.assertEqual(found.func.__name__, self.view.__name__)
#
# def test_get(self):
#
# # Anonymous user should get redirect to login
# response = self.client.get(self.url)
# expected_url = "%s?next=%s" % (reverse('hosting:login'),
# reverse('hosting:virtual_machine_key',
# kwargs={'pk': self.vm.id}))
# self.assertRedirects(response, expected_url=expected_url,
# status_code=302, target_status_code=200)
#
# # Logged user should get the page
# response = self.customer_client.get(self.url, follow=True)
# self.assertEqual(response.status_code, 200)
# #updated_vm = VirtualMachinePlan.objects.get(id=self.vm.id)
# #self.assertEqual(response.context['public_key'].decode("utf-8"), updated_vm.public_key)
# self.assertTrue(response.context['private_key'] is not None)
# self.assertEqual(len(response.context['public_key']), 380)
# self.assertTrue(len(response.context['private_key']) is 1678 or 1674)
# self.assertTemplateUsed(response, self.expected_template)
class VirtualMachineViewTest(BaseTestCase):
def setUp(self):
super(VirtualMachineViewTest, self).setUp()
self.stripe_customer = mommy.make(StripeCustomer, user=self.customer)
self.vm = mommy.make(VirtualMachinePlan)
self.vm.assign_permissions(self.customer)
self.order = mommy.make(HostingOrder, customer=self.stripe_customer, vm_plan=self.vm)
self.url = reverse('hosting:virtual_machines', kwargs={'pk': self.vm.id})
self.view = VirtualMachineView()
self.expected_template = 'hosting/virtual_machine_detail.html'
def url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
def test_get(self):
# Anonymous user should get redirect to login
response = self.client.get(self.url)
expected_url = "%s?next=%s" % (reverse('hosting:login'),
reverse('hosting:virtual_machines',
kwargs={'pk': self.vm.id}))
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
# Customer should be able to get data
response = self.customer_client.get(self.url, follow=True)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['virtual_machine'], self.vm)
self.assertTemplateUsed(response, self.expected_template)
# class VirtualMachineViewTest(BaseTestCase):
#
# def setUp(self):
# super(VirtualMachineViewTest, self).setUp()
#
# self.stripe_customer = mommy.make(StripeCustomer, user=self.customer)
# #self.vm = mommy.make(VirtualMachinePlan)
# self.vm.assign_permissions(self.customer)
# self.order = mommy.make(HostingOrder, customer=self.stripe_customer, vm_plan=self.vm)
# self.url = reverse('hosting:virtual_machines', kwargs={'pk': self.vm.id})
# self.view = VirtualMachineView()
# self.expected_template = 'hosting/virtual_machine_detail.html'
#
# def url_resolve_to_view_correctly(self):
# found = resolve(self.url)
# self.assertEqual(found.func.__name__, self.view.__name__)
#
# def test_get(self):
#
# # Anonymous user should get redirect to login
# response = self.client.get(self.url)
# expected_url = "%s?next=%s" % (reverse('hosting:login'),
# reverse('hosting:virtual_machines',
# kwargs={'pk': self.vm.id}))
# self.assertRedirects(response, expected_url=expected_url,
# status_code=302, target_status_code=200)
#
# # Customer should be able to get data
# response = self.customer_client.get(self.url, follow=True)
# self.assertEqual(response.status_code, 200)
# self.assertEqual(response.context['virtual_machine'], self.vm)
# self.assertTemplateUsed(response, self.expected_template)
class VirtualMachinesPlanListViewTest(BaseTestCase):
@ -361,8 +378,8 @@ class VirtualMachinesPlanListViewTest(BaseTestCase):
self.stripe_customer = mommy.make(StripeCustomer, user=self.customer)
mommy.make(HostingOrder, customer=self.stripe_customer, approved=True, _quantity=20)
_vms = VirtualMachinePlan.objects.all()
self.vms = sorted(_vms, key=lambda vm: vm.id, reverse=True)
# _vms = VirtualMachinePlan.objects.all()
# self.vms = sorted(_vms, key=lambda vm: vm.id, reverse=True)
self.url = reverse('hosting:virtual_machines')
self.view = VirtualMachinesPlanListView()
self.expected_template = 'hosting/virtual_machines.html'
@ -383,7 +400,7 @@ class VirtualMachinesPlanListViewTest(BaseTestCase):
# Customer should be able to get his orders
response = self.customer_client.get(self.url, follow=True)
self.assertEqual(response.status_code, 200)
self.assertEqual(list(response.context['vms']), self.vms[:10])
# self.assertEqual(list(response.context['vms']), self.vms[:10])
self.assertTemplateUsed(response, self.expected_template)
@ -456,7 +473,7 @@ class LoginViewTest(TestCase):
self.url = reverse('hosting:login')
self.view = LoginView
self.expected_template = 'hosting/login.html'
self.user = mommy.make('membership.CustomUser')
self.user = mommy.make('membership.CustomUser', validated=1)
self.password = 'fake_password'
self.user.set_password(self.password)
self.user.save()
@ -505,7 +522,7 @@ class SignupViewTest(TestCase):
def test_anonymous_user_can_signup(self):
response = self.client.post(self.url, data=self.signup_data, follow=True)
self.user = CustomUser.objects.get(email=self.signup_data.get('email'))
self.assertEqual(response.context['user'], self.user)
# self.assertEqual(response.context['user'], self.user)
self.assertEqual(response.status_code, 200)
@ -540,10 +557,11 @@ class PasswordResetViewTest(BaseTestCase):
self.assertEqual(response.status_code, 200)
def test_test_generate_email_context(self):
context = self.setup_view(self.view()).\
test_generate_email_context(self.user)
context = self.setup_view(self.view()).test_generate_email_context(
self.user
)
self.assertEqual(context.get('user'), self.user)
self.assertEqual(context.get('site_name'), 'ungleich')
self.assertEqual(context.get('site_name'), settings.DCL_TEXT)
self.assertEqual(len(context.get('token')), 24)
@ -578,7 +596,9 @@ class PasswordResetConfirmViewTest(BaseTestCase):
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, self.expected_template)
def test_post(self):
response = self.client.post(self.url, data=self.post_data, follow=True)
self.assertEqual(response.status_code, 200)
self.assertTrue(not response.context['form'].errors)
# def test_post(self):
# response = self.client.post(
# self.url, data=self.post_data, follow=True
# )
# self.assertEqual(response.status_code, 200)
# self.assertTrue(not response.context['form'].errors)

View file

@ -1,29 +1,41 @@
import re
# import re
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.core import mail
# from django.test import TestCase
# from django.core.urlresolvers import reverse
# from django.core import mail
class LoginTestCase(TestCase):
def test_login(self):
url = reverse('login_glarus')
res = self.client.post(url, data={'email': 'test@gmail.com', 'password': 'test', 'name': 'test'})
self.assertContains(res, "You\'re successfully registered!", 1, 200)
self.assertEqual(len(mail.outbox), 1)
validation_url = re.findall(r"http://.*?(/.*)", mail.outbox[0].body)
res1 = self.client.get(validation_url[0] + '/')
self.assertContains(res1, "Email verified!", 1, 200)
res2 = self.client.post(url, data={'email': 'test@gmail.com', 'password': 'test'})
self.assertEqual(res2.status_code, 302)
redirect_location = res2.get('Location')
res3 = self.client.get(redirect_location)
self.assertContains(res3, 'Pick coworking date.', 1, 200)
# check fail login
res4 = self.client.post(url, data={'email': 'test@gmail.com', 'password': 'falsepassword'})
self.assertContains(res4, 'Sorry, that login was invalid.', 1, 200)
# class LoginTestCase(TestCase):
# def test_login(self):
# url = reverse('login_glarus')
# res = self.client.post(
# url,
# data={
# 'email': 'test@gmail.com',
# 'password': 'test', 'name':
# 'test'}
# )
# self.assertContains(res, "You\'re successfully registered!", 1, 200)
# self.assertEqual(len(mail.outbox), 1)
#
# validation_url = re.findall(r"http://.*?(/.*)", mail.outbox[0].body)
# res1 = self.client.get(validation_url[0] + '/')
# self.assertContains(res1, "Email verified!", 1, 200)
#
# res2 = self.client.post(
# url, data={'email': 'test@gmail.com', 'password': 'test'}
# )
# self.assertEqual(res2.status_code, 302)
# redirect_location = res2.get('Location')
#
# res3 = self.client.get(redirect_location)
# self.assertContains(res3, 'Pick coworking date.', 1, 200)
#
# # check fail login
#
# res4 = self.client.post(
# url, data={
# 'email': 'test@gmail.com', 'password': 'falsepassword'
# }
# )
# self.assertContains(res4, 'Sorry, that login was invalid.', 1, 200)

View file

@ -1,13 +1,21 @@
import random
import string
from django.conf import settings
from django.test import TestCase
from unittest import skipIf
from .models import OpenNebulaManager
from .serializers import VirtualMachineSerializer
from utils.models import CustomUser
@skipIf(
settings.OPENNEBULA_DOMAIN is None or
settings.OPENNEBULA_DOMAIN == "test_domain",
"""OpenNebula details unavailable, so skipping
OpenNebulaManagerTestCases"""
)
class OpenNebulaManagerTestCases(TestCase):
"""This class defines the test suite for the opennebula manager model."""
@ -120,13 +128,20 @@ class OpenNebulaManagerTestCases(TestCase):
creating a new vm"""
@skipIf(
settings.OPENNEBULA_DOMAIN is None or
settings.OPENNEBULA_DOMAIN == "test_domain",
"""OpenNebula details unavailable, so skipping
VirtualMachineSerializerTestCase"""
)
class VirtualMachineSerializerTestCase(TestCase):
def setUp(self):
"""Define the test client and other test variables."""
self.manager = OpenNebulaManager(email=None, password=None)
def test_serializer_strips_of_public(self):
""" Test the serialized virtual machine object contains no 'public-'."""
""" Test the serialized virtual machine object contains no
'public-'."""
for vm in self.manager.get_vms():
serialized = VirtualMachineSerializer(vm)

View file

@ -10,7 +10,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<a class="navbar-brand" href="https://www.ungleich.ch">
<img src="{% static "blog.ungleich.ch/img/logo_white.svg" %}" />
</a>
</div>

View file

@ -13,7 +13,8 @@ class GlasfaserMenu(CMSAttachMenu):
def get_nodes(self, request):
nodes = []
glasfaser_cms = 'ungleich_page/glasfaser_cms_page.html'
if request and request.current_page.get_template() == glasfaser_cms:
if (request and request.current_page and
request.current_page.get_template() == glasfaser_cms):
template_context = {
"request": request,
}

View file

@ -3,7 +3,9 @@ from cms.plugin_pool import plugin_pool
from .models import (
UngelichContactUsSection, UngelichTextSection, Service, ServiceItem,
About, AboutItem, SectionWithImage
About, AboutItem, SectionWithImage, UngleichServiceItem, UngleichHeader,
UngleichHeaderItem, UngleichProductItem, UngleichProduct, UngleichCustomer,
UngleichCustomerItem, UngleichHTMLOnly, UngleichSimpleHeader
)
@ -145,3 +147,157 @@ class GlasfaserAboutItemPlugin(CMSPluginBase):
)
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichServicesPlugin(CMSPluginBase):
name = "ungleich Services Plugin"
model = Service
render_template = "ungleich_page/ungleich/section_services.html"
cache = False
allow_children = True
child_classes = ['UngleichServicesItemPlugin']
def render(self, context, instance, placeholder):
context['service_instance'] = instance
context['section_id'] = get_section_id(instance, 'services')
return context
@plugin_pool.register_plugin
class UngleichServicesItemPlugin(CMSPluginBase):
name = "ungleich Service Item Plugin"
model = UngleichServiceItem
render_template = "ungleich_page/ungleich/_services_item.html"
cache = False
require_parent = True
parent_classes = ['UngleichServicesPlugin']
def render(self, context, instance, placeholder):
context = super(UngleichServicesItemPlugin, self).render(
context, instance, placeholder
)
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichHeaderWithTextAndImagePlugin(CMSPluginBase):
name = "ungleich Header with Text and Image Plugin"
model = UngleichSimpleHeader
render_template = "ungleich_page/ungleich/header.html"
cache = False
def render(self, context, instance, placeholder):
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichHeaderWithTextAndImageSliderPlugin(CMSPluginBase):
name = "ungleich Header with Text and Image Slider Plugin"
model = UngleichHeader
render_template = "ungleich_page/ungleich/header_with_slider.html"
cache = False
allow_children = True
child_classes = ['UngleichHeaderItemPlugin']
def render(self, context, instance, placeholder):
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichHeaderItemPlugin(CMSPluginBase):
name = "ungleich Header Item Plugin"
model = UngleichHeaderItem
render_template = "ungleich_page/ungleich/_header_item.html"
cache = False
require_parent = True
parent_classes = ['UngleichHeaderWithTextAndImageSliderPlugin']
def render(self, context, instance, placeholder):
context = super(UngleichHeaderItemPlugin, self).render(
context, instance, placeholder
)
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichProductsPlugin(CMSPluginBase):
name = "ungleich Products Plugin"
model = UngleichProduct
render_template = "ungleich_page/ungleich/section_products.html"
cache = False
allow_children = True
child_classes = ['UngleichProductsItemPlugin']
def render(self, context, instance, placeholder):
context['product_instance'] = instance
context['section_id'] = get_section_id(instance, 'products')
return context
@plugin_pool.register_plugin
class UngleichProductsItemPlugin(CMSPluginBase):
name = "ungleich Product Item Plugin"
model = UngleichProductItem
render_template = "ungleich_page/ungleich/_products_item.html"
cache = False
require_parent = True
parent_classes = ['UngleichProductsPlugin']
def render(self, context, instance, placeholder):
context = super(UngleichProductsItemPlugin, self).render(
context, instance, placeholder
)
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichCustomerSectionPlugin(CMSPluginBase):
name = "ungleich Customer Section Plugin"
model = UngleichCustomer
render_template = "ungleich_page/ungleich/section_customers.html"
cache = False
allow_children = True
child_classes = ['UngleichCustomerItemPlugin']
def render(self, context, instance, placeholder):
context['customer_instance'] = instance
context['section_id'] = get_section_id(instance, 'customer')
return context
@plugin_pool.register_plugin
class UngleichCustomerItemPlugin(CMSPluginBase):
name = "ungleich Customer Item Plugin"
model = UngleichCustomerItem
render_template = "ungleich_page/ungleich/_customer_item.html"
cache = False
require_parent = True
parent_classes = ['UngleichCustomerSectionPlugin']
def render(self, context, instance, placeholder):
context = super(UngleichCustomerItemPlugin, self).render(
context, instance, placeholder
)
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichHTMLPlugin(CMSPluginBase):
name = "ungleich HTML Plugin"
model = UngleichHTMLOnly
render_template = "ungleich_page/ungleich/html_block.html"
cache = False
def render(self, context, instance, placeholder):
context = super(UngleichHTMLPlugin, self).render(
context, instance, placeholder
)
context['instance'] = instance
return context

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-13 02:21+0530\n"
"POT-Creation-Date: 2017-11-06 00:24+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,6 +18,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Glasfaser menu"
msgstr ""
msgid "\"Sorry, we could not find the page you are looking for!\""
msgstr ""
msgid "Toggle navigation"
msgstr "Umschalten"

View file

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-11-17 10:11
from __future__ import unicode_literals
from django.db import migrations
import djangocms_text_ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
('ungleich_page', '0006_aboutitem_link_url'),
]
operations = [
migrations.AlterField(
model_name='ungelichpicture',
name='title',
field=djangocms_text_ckeditor.fields.HTMLField(),
),
]

View file

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-11-17 18:49
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import filer.fields.image
class Migration(migrations.Migration):
dependencies = [
('filer', '0004_auto_20160328_1434'),
('ungleich_page', '0007_auto_20171117_1011'),
]
operations = [
migrations.CreateModel(
name='UngleichServiceItem',
fields=[
('serviceitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ungleich_page.ServiceItem')),
('data_replaced_image', filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='service_item_data_replaced_image', to='filer.Image')),
],
options={
'abstract': False,
},
bases=('ungleich_page.serviceitem',),
),
]

View file

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-11-19 11:28
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import djangocms_text_ckeditor.fields
import filer.fields.image
class Migration(migrations.Migration):
dependencies = [
('filer', '0004_auto_20160328_1434'),
('cms', '0014_auto_20160404_1908'),
('ungleich_page', '0008_ungleichserviceitem'),
]
operations = [
migrations.CreateModel(
name='UngleichHeader',
fields=[
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
('carousel_data_interval', models.IntegerField(default=5000)),
('background_image', filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ungleich_header_background_image', to='filer.Image')),
],
options={
'abstract': False,
},
bases=('cms.cmsplugin',),
),
migrations.CreateModel(
name='UngleichHeaderItem',
fields=[
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
('description', djangocms_text_ckeditor.fields.HTMLField()),
('image', filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ungleich_header_item_image', to='filer.Image')),
],
options={
'abstract': False,
},
bases=('cms.cmsplugin',),
),
]

View file

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-11-19 14:04
from __future__ import unicode_literals
from django.db import migrations
import djangocms_text_ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
('ungleich_page', '0009_ungleichheader_ungleichheaderitem'),
]
operations = [
migrations.AlterField(
model_name='service',
name='sub_title',
field=djangocms_text_ckeditor.fields.HTMLField(),
),
]

View file

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-11-21 19:04
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ungleich_page', '0010_auto_20171119_1404'),
]
operations = [
migrations.CreateModel(
name='UngleichProduct',
fields=[
('service_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ungleich_page.Service')),
('section_class', models.CharField(blank=True, default='', max_length=100)),
],
options={
'abstract': False,
},
bases=('ungleich_page.service',),
),
migrations.CreateModel(
name='UngleichProductItem',
fields=[
('serviceitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ungleich_page.ServiceItem')),
('url', models.URLField(blank=True, default='', max_length=300)),
],
options={
'abstract': False,
},
bases=('ungleich_page.serviceitem',),
),
]

View file

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-11-23 08:11
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import djangocms_text_ckeditor.fields
import filer.fields.image
class Migration(migrations.Migration):
dependencies = [
('filer', '0004_auto_20160328_1434'),
('cms', '0014_auto_20160404_1908'),
('ungleich_page', '0011_ungleichproduct_ungleichproductitem'),
]
operations = [
migrations.CreateModel(
name='UngleichCustomer',
fields=[
('service_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ungleich_page.Service')),
('section_class', models.CharField(blank=True, default='', max_length=100)),
('carousel_data_interval', models.IntegerField(default=3000)),
('bottom_text', djangocms_text_ckeditor.fields.HTMLField(default='<h3 class="section-subheading text-muted">*ungleich means not equal to (≠) U+2260.</h3>')),
],
options={
'abstract': False,
},
bases=('ungleich_page.service',),
),
migrations.CreateModel(
name='UngleichCustomerItem',
fields=[
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
('url', models.URLField(blank=True, default='', max_length=300)),
('description', djangocms_text_ckeditor.fields.HTMLField()),
('image', filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='customer_item_image', to='filer.Image')),
],
options={
'abstract': False,
},
bases=('cms.cmsplugin',),
),
]

View file

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-11-23 11:49
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import djangocms_text_ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
('cms', '0014_auto_20160404_1908'),
('ungleich_page', '0012_ungleichcustomer_ungleichcustomeritem'),
]
operations = [
migrations.CreateModel(
name='UngleichHTMLOnly',
fields=[
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
('HTML', djangocms_text_ckeditor.fields.HTMLField()),
],
options={
'abstract': False,
},
bases=('cms.cmsplugin',),
),
]

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-11-24 07:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ungleich_page', '0013_ungleichhtmlonly'),
]
operations = [
migrations.AddField(
model_name='ungleichhtmlonly',
name='name',
field=models.CharField(blank=True, default='', max_length=50),
),
]

View file

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-11-24 19:12
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import djangocms_text_ckeditor.fields
import filer.fields.image
class Migration(migrations.Migration):
dependencies = [
('filer', '0004_auto_20160328_1434'),
('cms', '0014_auto_20160404_1908'),
('ungleich_page', '0014_ungleichhtmlonly_name'),
]
operations = [
migrations.CreateModel(
name='UngleichSimpleHeader',
fields=[
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
('text', djangocms_text_ckeditor.fields.HTMLField()),
('background_image', filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ungleich_simple_header_background_image', to='filer.Image')),
('image', filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ungleich_simple_header_image', to='filer.Image')),
],
options={
'abstract': False,
},
bases=('cms.cmsplugin',),
),
]

View file

@ -11,7 +11,7 @@ class UngelichPicture(CMSPlugin):
related_name="image",
on_delete=models.SET_NULL
)
title = models.CharField(max_length=400)
title = HTMLField()
class SectionWithImage(UngelichPicture):
@ -54,7 +54,7 @@ class UngelichTextSection(CMSPlugin):
class Service(CMSPlugin):
menu_text = models.CharField(max_length=100, default="", blank=True)
title = models.CharField(max_length=200)
sub_title = models.CharField(max_length=200)
sub_title = HTMLField()
def __str__(self):
return self.title
@ -87,3 +87,84 @@ class AboutItem(UngelichPicture):
return "{alignment} - {title}".format(
alignment=alignment, title=self.title
)
class UngleichServiceItem(ServiceItem):
data_replaced_image = FilerImageField(
null=True,
blank=True,
related_name="service_item_data_replaced_image",
on_delete=models.SET_NULL
)
class UngleichSimpleHeader(CMSPlugin):
background_image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_simple_header_background_image",
on_delete=models.SET_NULL
)
image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_simple_header_image",
on_delete=models.SET_NULL
)
text = HTMLField()
class UngleichHeader(CMSPlugin):
background_image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_header_background_image",
on_delete=models.SET_NULL
)
carousel_data_interval = models.IntegerField(default=5000)
class UngleichHeaderItem(CMSPlugin):
image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_header_item_image",
on_delete=models.SET_NULL
)
description = HTMLField()
class UngleichProductItem(ServiceItem):
url = models.URLField(max_length=300, default="", blank=True)
class UngleichProduct(Service):
section_class = models.CharField(max_length=100, default="", blank=True)
class UngleichCustomer(Service):
section_class = models.CharField(max_length=100, default="", blank=True)
carousel_data_interval = models.IntegerField(default=3000)
bottom_text = HTMLField(
default='<h3 class="section-subheading text-muted">*ungleich means '
'not equal to (≠) U+2260.</h3>'
)
class UngleichCustomerItem(CMSPlugin):
image = FilerImageField(
null=True,
blank=True,
related_name="customer_item_image",
on_delete=models.SET_NULL
)
url = models.URLField(max_length=300, default="", blank=True)
description = HTMLField()
class UngleichHTMLOnly(CMSPlugin):
name = models.CharField(max_length=50, default="", blank=True)
HTML = HTMLField()
def __str__(self):
return self.name

View file

@ -265,6 +265,7 @@ fieldset[disabled] .btn-xl.active {
.navbar-default.navbar-shrink .navbar-brand {
font-size: 1.5em;
padding: 8px;
}
}

View file

@ -7,6 +7,17 @@
color: #494949;
}
.header-vh {
height: 30px;
}
.intro-cap-sans-transform p {
font-family: 'Raleway', 'Helvetica Neue', 'Open Sans Bold', Helvetica, Arial, 'Arial Bold', sans-serif;
font-size: 26px;
font-style: normal;
font-weight: 200;
color: #FFF;
}
.intro-cap {
font-family: 'Raleway', 'Helvetica Neue', 'Open Sans Bold', Helvetica, Arial, 'Arial Bold', sans-serif;
font-size: 26px;
@ -111,3 +122,52 @@
paddding: 10px;
}
}
.header_slider {
height: 100vh;
}
.header_slider > .carousel {
display: flex;
flex-direction: column;
height: 100%;
align-items: stretch;
}
.header_slider > .carousel .item {
padding-top: 150px;
}
.timeline>li .timeline-panel {
display: flex;
min-height: 80px;
align-items: center;
padding-bottom: 15px;
}
.flex-justify-content-end{
justify-content: flex-end;
}
.flex-justify-content-start{
justify-content: flex-start;
}
.timeline>li.timeline-inverted>.timeline-panel {
padding-bottom: 0;
}
@media (min-width: 768px) and (max-width: 991px) {
.timeline>li .timeline-panel {
min-height: 100px;
}
}
@media (min-width: 992px) {
.timeline>li .timeline-panel {
min-height: 170px;
}
}

View file

@ -2,16 +2,16 @@
$(function(){
new WOW().init();
$('.img-toggle').one('mouseover', toggleImage);
$('.img-toggle').one('mouseenter', toggleImage);
});
function toggleImage(e) {
var $this = $(this),
toggle_img = $this.attr('data-replaced'),
current_img = $this.attr('src');
$this.fadeOut(600, function() {
$this.fadeOut(200, function() {
$this.attr('src', toggle_img);
$this.attr('data-replaced', current_img);
$this.fadeIn(900);
$this.fadeIn(300);
});
};

View file

@ -1,4 +1,4 @@
{% load staticfiles%}
{% load staticfiles i18n %}
<!DOCTYPE html>
<html lang="en">
@ -33,27 +33,21 @@
</head>
<body>
<body class="error404">
<body class="error404">
<div class="content-404">
<div class="container">
<div class="text-center">
<div class="container text-center">
<h1>&nbsp;</h1>
<h1>404</h1>
<p class="lead">
"Sorry, we could not find the page you are looking for!"
{% trans '"Sorry, we could not find the page you are looking for!"' %}
</p>
</div>
</div>
</div>
<!-- Footer --><!-- jQuery -->
<script src="{% static 'hosting/js/jquery.js' %}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>

View file

@ -14,7 +14,7 @@
<title>ungleich GmbH</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'ungleich_page/css/bootstrap.min.css' %}" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="{% static 'ungleich_page/css/lib/animate.min.css' %}" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
@ -91,8 +91,8 @@
</div>
<div class="split-description wow fadeInUp">
<p class="lead"><strong>Surfen Sie mit 100 Mbit/s im Internet!</strong></p>
<p class="lead">Mit dem neuen Glasfaser-Angebot der ungleich macht das Arbeiten im Internet richtig Spass. Das beste daran: die Geschwindigkeit symmetrisch in beide Richtungen verfügbar. Damit kann ihr Firmennetzwerk auch Dienste bereitstellen.</p>
<p class="lead">Dieses Angebot ist im Moment ausschliesslich für Firmenkunden verfügbar. Die Aufschaltkosten der Glasfaserleitung sind von der Entfernung zum nächsten Anschlusspunkt abhängig. Fragen Sie noch heute nach einem individuellem Angebot.</p>
<p class="lead">Mit dem neuen Glasfaser-Angebot der ungleich macht das Arbeiten im Internet richtig Spass. Das beste daran: die Geschwindigkeit ist symmetrisch in beide Richtungen verfügbar. Damit kann Ihr Firmennetzwerk auch Dienste bereitstellen.</p>
<p class="lead">Dieses Angebot ist im Moment ausschliesslich für Firmenkunden verfügbar. Die Aufschaltkosten der Glasfaserleitung sind von der Entfernung zum nächsten Anschlusspunkt abhängig. Fragen Sie noch heute nach einem individuellem Angebot. Gerne stellen wir Ihnen eine persönliche Offerte zusammen.</p>
</div>
</div>
</div>
@ -144,7 +144,7 @@
<img src="{% static 'ungleich_page/img/glasfaser/switch.svg' %}" class="img-responsive img-circle" alt="">
<div class="team-member-caption inline-block">
<h4 class="portfolio-caption">Einfach zu nutzen</h4>
<p class="text-muted">2 vorkonfigurierte Endgeräte (benötigt zwei Steckdosen auf Ihrer Seite)</p>
<p class="text-muted">2 bereits für Sie konfigurierte Endgeräte (benötigt zwei Ihrer Steckdosen)</p>
<p class="text-muted">Einfach einstecken und los!</p>
</div>
</div>
@ -199,7 +199,7 @@
</div>
<div class="timeline-panel wow slideInDown">
<div class="timeline-body">
<p>Sie müssen dann nur noch Ihre Geräte anschliessen und schon surfen Sie bllitzschnell im Internet!</p>
<p>Sie müssen dann nur noch Ihre Geräte anschliessen und schon surfen Sie blitzschnell im Internet!</p>
</div>
</div>
</li>

View file

@ -4,7 +4,7 @@
<img class="img-circle img-responsive" src="{{ instance.image.url }}" alt="">
</div>
{% if instance.link_url %}</a>{% endif %}
<div class="timeline-panel wow {% if instance.inverted %}slideInRight{% else %}slideInLeft{% endif %}">
<div class="timeline-panel wow {% if instance.inverted %}slideInRight flex-justify-content-start {% else %}slideInLeft flex-justify-content-end{% endif %}">
<div class="timeline-body">
<p>{{ instance.title }}</p>
</div>

View file

@ -11,7 +11,6 @@
{% render_plugin plugin %}
</div>
{% endfor %}
</div>
</div>
</section>

View file

@ -1,5 +1,4 @@
{% load static %}
{% load i18n %}
{% load static i18n %}
<section id="about">
<div class="container">
@ -32,7 +31,7 @@
</div>
<div class="timeline-body">
<p>{% trans "ungleich founded" %} </p>
<p>{% trans "in Switzerland" %} </p>
<p>{% trans "in Switzerland" %}</p>
</div>
</div>
</li>

View file

@ -3,8 +3,8 @@
<section id="contact">
<div class="container">
<div class="row" class="wow fadeInDown">
<div class="col-lg-12 text-center wow fadeInDown">
<div class="wow fadeInDown">
<div class="text-center wow fadeInDown">
{% for message in messages %}
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"
@ -15,14 +15,15 @@
<h2 class="section-heading">{% trans "Contact Us" %}</h2>
<br>
<h3 class="intro-smallcap">{% trans "Join us at" %} <a
href="{% url 'digitalglarus:landing' %}">{% trans "Digital Glarus" %}</a>,
{% trans "a great co-working space in the middle of Alps!" %}
<p></p> {% trans "You can contact us at" %} </h3>
<h3 class="intro-smallcap"><a href="mailto:info@ungleich.ch"><i class="fa fa-envelope">info@ungleich.ch</i></a>
<h3 class="intro-smallcap">
{% trans "Join us at" %} <a href="{% url 'digitalglarus:landing' %}">{% trans "Digital Glarus" %}</a>, {% trans "a great co-working space in the middle of Alps!" %} <br>
{% trans "You can contact us at" %}
</h3>
<h3 class="intro-smallcap">
<a href="mailto:info@ungleich.ch"><i class="fa fa-envelope"></i> info@ungleich.ch</a>
</h3>
<h3 class="intro-smallcap"><i class="fa fa-phone"></i> (044) 534-66-22<p></p></h3>
<h3 class="intro-smallcap"><i class="fa fa-phone"></i> (044) 534-66-22</h3>
<!-- <h3 class="intro-smallcap">{% trans "or" %}</h3> -->
<!-- <h3 class="intro-smallcap">{% trans "Contact Us" %}</h3> -->
@ -62,12 +63,6 @@
</div>
</form> -->
</div>
<p>&nbsp;</p>
</div>
<div class="row">
<div class="col-lg-12">
</div>
</div>
</div>
</section>

View file

@ -9,17 +9,21 @@
</div>
<div class="col-md-4">
<ul class="list-inline social-buttons">
<li><a href="https://twitter.com/ungleich"><i class="fa fa-twitter"></i></a>
<li>
<a href="https://twitter.com/ungleich"><i class="fa fa-twitter"></i></a>
</li>
<li><a href="https://github.com/ungleich"><i class="fa fa-github"></i></a>
<li>
<a href="https://github.com/ungleich"><i class="fa fa-github"></i></a>
</li>
<li><a href="https://www.linkedin.com/company/ungleich-gmbh?trk=nav_account_sub_nav_company_admin/"><i class="fa fa-linkedin"></i></a>
<li>
<a href="https://www.linkedin.com/company/ungleich-gmbh?trk=nav_account_sub_nav_company_admin/"><i class="fa fa-linkedin"></i></a>
</li>
</ul>
</div>
<div class="col-md-4">
<ul class="list-inline quicklinks">
<li><a href="http://www.ungleich.ch/">{% trans "ungleich Home" %} </a>
<li>
<a href="http://www.ungleich.ch/">{% trans "ungleich Home" %}</a>
</li>
</ul>
</div>

View file

@ -10,7 +10,7 @@
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-6 portfolio-item wow fadeInDown" data-wow-delay="0.5s">
<div class="col-md-4 col-sm-6 portfolio-item wow fadeInUp" data-wow-delay="0.25s">
<a href="{% url 'datacenterlight:index' %}"><img src="{% static 'ungleich_page/img/portfolio/datacenterlight.png' %}" class="img-responsive inline-block" alt=""></a>
<div class="portfolio-caption inline-block">
<h4>{% trans "Data Center Light" %}</h4>
@ -18,7 +18,7 @@
<p class="text-muted">{% trans "We offer the most affordable hosting in Switzerland. Data Center Light has full FOSS stack, 100% IPv6 and 100% SSD. Choose any configuration among CentOS, Debian, Ubuntu, Devuan, and FreeBSD." %} </p>
</div>
</div>
<div class="col-md-4 col-sm-6 portfolio-item wow fadeInDown" data-wow-delay="1s">
<div class="col-md-4 col-sm-6 portfolio-item wow fadeInUp" data-wow-delay="0.5s">
<a href="{% url 'rails.hosting' %}"><img src="{% static 'ungleich_page/img/portfolio/startup-framework.png' %}" class="img-responsive inline-block" alt=""></a>
<div class="portfolio-caption inline-block">
<h4>{% trans "Rails Hosting" %} </h4>
@ -26,7 +26,7 @@
<p class="text-muted">{% trans "Ready to go live with your Ruby on Rails application? We offer you ready-to-deploy virtual machines or configure your existing infrastructure for Ruby on Rails." %}</p>
</div>
</div>
<div class="col-md-4 col-sm-6 portfolio-item wow fadeInDown" data-wow-delay="1.5s">
<div class="col-md-4 col-sm-6 portfolio-item wow fadeInUp" data-wow-delay="0.75s">
<a href="{% url 'datacenterlight:glasfaser' %}"><img src="{% static 'ungleich_page/img/portfolio/glasfaser.png' %}" class="img-responsive inline-block" alt=""></a>
<div class="portfolio-caption inline-block">
<h4>{% trans "High Speed Internet" %}</h4>

View file

@ -3,18 +3,16 @@
<section id="services">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center wow fadeInDown">
<div class="text-center wow fadeInDown">
<h2 class="section-heading">{% trans "our services" %}</h2>
<h3 class="section-subheading text-muted">
{% trans "We support our clients in all areas of Unix infrastructure." %}<br/>
{% trans "Our top notch configuration management is refreshingly simple and reliable." %}
</h3>
</div>
</div>
<div class="row text-center">
<div class="col-sm-4">
<div class="team-member wow fadeInDown" data-wow-delay="0.5s">
<div class="team-member wow fadeInUp" data-wow-delay="0.25s">
<img src="{% static 'ungleich_page/img/team/5.jpg' %}" data-replaced="{% static 'ungleich_page/img/services/hosting.png' %}" class="img-responsive img-circle img-toggle" alt="">
<div class="team-member-caption inline-block">
<h4 class="portfolio-caption">{% trans "Hosting" %}</h4>
@ -24,22 +22,21 @@
</div>
</div>
<div class="col-sm-4">
<div class="team-member wow fadeInDown" data-wow-delay="1s">
<div class="team-member wow fadeInUp" data-wow-delay="0.5s">
<img src="{% static 'ungleich_page/img/team/4.jpg' %}" data-replaced="{% static 'ungleich_page/img/services/configuration.png' %}" class="img-responsive img-circle img-toggle" alt="">
<div class="team-member-caption inline-block">
<h4 class="portfolio-caption">{% trans "Configuration as a Service" %}</h4>
<p>&nbsp;</p>
<p><span class="text-muted">{% trans "Ruby on Rails, Django, Java, Webserver, Mailserver, any infrastructure that needs to configured, we provide comprehensive solutions. Amazon, rackspace or bare metal servers, we configure for you." %}</span></p>
<p class="text-muted">&nbsp;</p>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="team-member wow fadeInDown" data-wow-delay="1.5s">
<div class="team-member wow fadeInUp" data-wow-delay="0.75s">
<img src="{% static 'ungleich_page/img/team/6.jpg' %}" data-replaced="{% static 'ungleich_page/img/services/linux.png' %}" class="img-responsive img-circle img-toggle cursor-pointer" alt="">
<h4 class="portfolio-caption">{% trans "Linux System Engineering" %}</h4>
<p class="text-muted">&nbsp;</p>
<div class="team-member-caption inline-block">
<h4 class="portfolio-caption">{% trans "Linux System Engineering" %}</h4>
<p>&nbsp;</p>
<p class="text-muted">{% trans "Let your developers develop! We take care of your system administration. Gentoo, Archlinux, Debian, Ubuntu, and many more." %}</p>
</div>
</div>

View file

@ -3,15 +3,13 @@
<section id="team" class="bg-light-gray">
<div class="container">
<div class="row">
<div class="col-sm-16 text-center center-block wow fadeInDown">
<div class="text-center wow fadeInDown">
<h2 class="section-heading">{% trans "Why ungleich?*" %}</h2>
<h3 class="text-muted">{% trans "What our customers say" %}</h3>
</div>
</div>
<div class="row">
<div class="col-sm-10 center-block wow fadeInDown">
<div class="col-sm-10 col-sm-offset-1 wow fadeInDown">
<!-- start:recommendationSlider -->
<div id="carousel-recommendation-ungleich" class="carousel slide ungleich ungleich-gallery ungleich-gallery-text-carousel" data-ride="carousel" data-interval="3000">
<!-- Indicators -->
@ -91,7 +89,7 @@
</div>
</div>
</div>
<div class="col-sm-16 text-center center-block">
<div class="text-center">
<h3 class="section-subheading text-muted">{% blocktrans %}*ungleich means not equal to (≠) U+2260.{% endblocktrans %}</h3>
</div>
</section>

View file

@ -1,6 +1,5 @@
{% load static %}
{% load bootstrap3 %}
{% load i18n %}
{% load static i18n %}
<!DOCTYPE html>
<html lang="en">
<head>
@ -13,10 +12,10 @@
<title>ungleich GmbH</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'ungleich_page/css/bootstrap.min.css' %}" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="{% static 'ungleich_page/css/lib/animate.min.css' %}" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Raleway|Montserrat:400,700|Droid+Serif:400,700,400italic,700italic|Roboto+Slab:400,100,300,700" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@ -51,10 +50,9 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<p><a class="navbar-brand page-scroll" href="#page-top"><img
src="{% static 'ungleich_page/img/logo_white.svg' %}"></a></p>
<p>&nbsp;</p>
<a class="navbar-brand page-scroll" href="#page-top">
<img src="{% static 'ungleich_page/img/logo_white.svg' %}">
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
@ -64,13 +62,11 @@
<a href="#page-top"></a>
</li>
<li>
<a class="page-scroll" href="#services">{% trans "Services"%}</a></li>
<li></li>
<li></li>
<li></li>
<a class="page-scroll" href="#services">{% trans "Services"%}</a>
</li>
<li>
<a class="page-scroll" href="#portfolio">{% trans "products"%}</a></li>
<li></li>
<a class="page-scroll" href="#portfolio">{% trans "products"%}</a>
</li>
<li>
<a class="page-scroll" href="#about">{% trans "About"%}</a>
</li>
@ -78,7 +74,7 @@
<a class="page-scroll" href="#team">{% trans "WHY UNGLEICH?"%}</a>
</li>
<li>
<a class="page-scroll" href="http://blog.ungleich.ch">{% trans "BLOG"%}</a>
<a class="page-scroll" href="https://blog.ungleich.ch">{% trans "BLOG"%}</a>
</li>
<li>
<a class="page-scroll" href="#contact">{% trans "CONTACT"%} </a>
@ -114,19 +110,6 @@
<!-- Footer -->
{% include "ungleich_page/includes/_footer.html" %}
<!-- Portfolio Modals -->
<!-- Use the modals below to showcase details about your portfolio projects! -->
<!-- Portfolio Modal 1 -->
<!-- Portfolio Modal 2 -->
<!-- Portfolio Modal 3 -->
<!-- Portfolio Modal 4 -->
<!-- Portfolio Modal 6 -->
<!-- jQuery -->
<script src="{% static 'ungleich_page/js/jquery.js' %}" type="text/javascript"></script>
<script type="text/javascript">
@ -138,32 +121,22 @@
</script>
<!-- Bootstrap Core JavaScript -->
<script src="{% static 'ungleich_page/js/bootstrap.min.js' %}" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>
<!-- Plugin JavaScript -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"
type="text/javascript"></script>
<script src="{% static 'ungleich_page/js/classie.js' %}" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/classie/1.0.1/classie.min.js" type="text/javascript"></script>
<script src="{% static 'ungleich_page/js/cbpAnimatedHeader.js' %}" type="text/javascript"></script>
<!-- Contact Form JavaScript -->
<script src="{% static 'ungleich_page/js/jqBootstrapValidation.js' %}" type="text/javascript"></script>
<!-- <script src="{% static 'ungleich_page/js/contact_me.js' %}" type="text/javascript"></script> -->
<script src="{% static 'ungleich_page/js/lib/wow.min.js' %}" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js" type="text/javascript"></script>
<!-- Custom Theme JavaScript -->
<script src="{% static 'ungleich_page/js/ungleich.js' %}" type="text/javascript"></script>
<!-- Custom Fonts -->
<link href="//fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">
<link href="{% static 'ungleich_page/font-awesome-4.1.0/css/font-awesome.min.css' %}" rel="stylesheet"
type="text/css">
<link href="//fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Kaushan+Script" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic" rel="stylesheet"
type="text/css">
<link href="//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700" rel="stylesheet" type="text/css">
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</body>
</html>

View file

@ -0,0 +1,2 @@
<a href="{{ instance.url }}"><img class="center-block img-client img-responsive" src="{{ instance.image.url}}"></a>
<p class="carousel-text text-muted text-center">{{ instance.description }}</p>

View file

@ -0,0 +1,14 @@
<div class="container">
<div>
{% if instance.image %}
<img src="{{ instance.image.url }}" alt=""
class="logo-image" img-responsive="" width="300"/>
<div class="header-vh"></div>
{% endif %}
<div>
<span class="intro-cap-sans-transform">
{{ instance.description }}
</span>
</div>
</div>
</div>

View file

@ -0,0 +1,6 @@
<a href="{{ instance.url }}"><img src="{{ instance.image.url}}" class="img-responsive inline-block" alt=""></a>
<div class="portfolio-caption inline-block">
<h4>{{ instance.title }}</h4>
<p>&nbsp;</p>
<p class="text-muted">{{ instance.description }}</p>
</div>

View file

@ -0,0 +1,8 @@
<div class="team-member wow fadeInUp" data-wow-delay="0.25s">
<img src="{{ instance.image.url }}" data-replaced="{{ instance.data_replaced_image.url }}" class="img-responsive img-circle img-toggle" alt="">
<div class="team-member-caption inline-block">
<h4 class="portfolio-caption">{{ instance.title }}</h4>
<p>&nbsp;</p>
<p><span class="text-muted">{{ instance.description }}</span></p>
</div>
</div>

View file

@ -0,0 +1,15 @@
{% load cms_tags %}
<!-- Header -->
<header style="background-image: url({{ instance.background_image.url }})">
<div class="container">
<div class="intro-text">
<img src="{{ instance.image.url }}" alt="" class="logo-image" img-responsive="" width="300" />
<p></p><p></p><br>
<div class="intro-cap">
<span class="intro-cap">
{{ instance.text }}
</span>
</div>
</div>
</div>
</header>

View file

@ -0,0 +1,21 @@
{% load cms_tags %}
<header class="header_slider" style="background-image: url({{ instance.background_image.url }})">
<div id="carousel-header-ungleich" class="carousel slide" data-ride="carousel" data-interval="{{ instance.carousel_data_interval}}">
<!-- Indicators -->
{% if instance.child_plugin_instances|length > 1 %}
<ol class="carousel-indicators">
{% for plugin in instance.child_plugin_instances %}
<li data-target="#carousel-header-ungleich" data-slide-to="{{forloop.counter0}}" {% if forloop.counter0 == 0 %}class="active" {% endif %}></li>
{% endfor %}
</ol>
{% endif %}
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
{% for plugin in instance.child_plugin_instances %}
<div class="item {% if forloop.counter0 == 0 %}active{% endif %}">
{% render_plugin plugin %}
</div>
{% endfor %}
</div>
</div>
</header>

View file

@ -0,0 +1,5 @@
{% load cms_tags static %}
{{instance.HTML}}
{% for plugin in instance.child_plugin_instances %}
{% render_plugin plugin %}
{% endfor %}

View file

@ -0,0 +1,35 @@
{% load cms_tags custom_tags %}
<section id="{{section_id}}" class="{% if customer_instance.section_class %}{{ customer_instance.section_class }}{% else %}bg-light-gray{% endif %}">
<div class="container">
<div class="text-center wow fadeInDown" style="visibility: visible; animation-name: fadeInDown;">
<h2 class="section-heading">{{ customer_instance.title }}</h2>
<h3 class="text-muted">{{ customer_instance.sub_title }}</h3>
</div>
<div class="row">
<div class="col-sm-10 col-sm-offset-1 wow fadeInDown" style="visibility: visible; animation-name: fadeInDown;">
<!-- start:recommendationSlider -->
<div id="carousel-recommendation-ungleich" class="carousel slide ungleich ungleich-gallery ungleich-gallery-text-carousel" data-ride="carousel" data-interval="{{ customer_instance.carousel_data_interval}}">
<!-- Indicators -->
<ol class="carousel-indicators">
{% for plugin in customer_instance.child_plugin_instances %}
<li data-target="#carousel-recommendation-ungleich" data-slide-to="{{forloop.counter0}}" {% if forloop.counter0 == 0 %}class="active" {% endif %}></li>
{% endfor %}
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
{% for plugin in customer_instance.child_plugin_instances %}
<div class="item {% if forloop.counter0 == 0 %}active{% endif %}">
{% render_plugin plugin %}
</div>
{% endfor %}
</div>
</div>
<!-- end:recommendationSlider -->
</div>
</div>
</div>
<div class="text-center">
{{customer_instance.bottom_text}}
</div>
</section>

View file

@ -0,0 +1,20 @@
{% load cms_tags custom_tags %}
<section id="{{section_id}}" class="products-section {% if product_instance.section_class %}{{ product_instance.section_class }}{% else %}bg-light-gray{% endif %}">
<div id="portfolio">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center wow fadeInDown" style="visibility: visible; animation-name: fadeInDown;">
<h2 class="section-heading">{{ product_instance.title }}</h2>
{{ product_instance.sub_title }}
</div>
</div>
<div class="row">
{% for plugin in product_instance.child_plugin_instances %}
<div class="col-md-4 col-sm-6 portfolio-item wow fadeInUp" data-wow-delay="{{ forloop.counter|multiply:0.25 }}s" style="visibility: visible; animation-delay: {{ forloop.counter|multiply:0.25 }}s; animation-name: fadeInUp;">
{% render_plugin plugin %}
</div>
{% endfor %}
</div>
</div>
</div>
</section>

View file

@ -0,0 +1,16 @@
{% load cms_tags %}
<section id="{{section_id}}">
<div class="container">
<div class="text-center wow fadeInDown">
<h2 class="section-heading">{{ service_instance.title }}</h2>
{{ service_instance.sub_title }}
</div>
<div class="row text-center">
{% for plugin in service_instance.child_plugin_instances %}
<div class="col-sm-4">
{% render_plugin plugin %}
</div>
{% endfor %}
</div>
</div>
</section>

View file

@ -0,0 +1,75 @@
{% load static i18n cms_tags sekizai_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{% page_attribute "page_title" %}</title>
<!-- Bootstrap Core CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="{% static 'ungleich_page/css/lib/animate.min.css' %}" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Raleway|Montserrat:400,700|Droid+Serif:400,700,400italic,700italic|Roboto+Slab:400,100,300,700" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Custom CSS -->
<link href="{% static 'ungleich_page/css/agency.css' %}" rel="stylesheet">
<link href="{% static 'ungleich_page/css/ungleich.css' %}" rel="stylesheet">
{% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %}
{% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %}
<!-- Google analytics -->
{% include "google_analytics.html" %}
<!-- End Google Analytics -->
<link rel="shortcut icon" href="{% static 'ungleich_page/img/favicon.ico' %}" type="image/x-icon">
</head>
<body id="page-top" class="index">
{% cms_toolbar %}
{% placeholder 'Ungleich Page Contents' %}
<!-- Footer -->
{% include "ungleich_page/includes/_footer.html" %}
<!-- jQuery -->
<script src="{% static 'ungleich_page/js/jquery.js' %}" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
if ($(".has-error").length != 0) {
window.location = window.location.pathname + "#contact"
}
});
</script>
<!-- Bootstrap Core JavaScript -->
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>
<!-- Plugin JavaScript -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/classie/1.0.1/classie.min.js" type="text/javascript"></script>
<script src="{% static 'ungleich_page/js/cbpAnimatedHeader.js' %}" type="text/javascript"></script>
<!-- Contact Form JavaScript -->
<script src="{% static 'ungleich_page/js/jqBootstrapValidation.js' %}" type="text/javascript"></script>
<!-- <script src="{% static 'ungleich_page/js/contact_me.js' %}" type="text/javascript"></script> -->
<script src="//cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js" type="text/javascript"></script>
<!-- Custom Theme JavaScript -->
<script src="{% static 'ungleich_page/js/ungleich.js' %}" type="text/javascript"></script>
<!-- Custom Fonts -->
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</body>
</html>

View file

@ -736,7 +736,7 @@ msgid "Unknown or unspecified country"
msgstr ""
msgid "Enter your name or company name"
msgstr "Geben Sie Ihren Namen oder der Ihrer Firma ein"
msgstr "Gib Deinen Namen oder den Name Deines Unternehmens ein"
msgid "Your username and/or password were incorrect."
msgstr "Dein Benutzername und/oder Dein Passwort ist falsch."

View file

@ -75,6 +75,7 @@ class BillingAddressFormTest(TestCase):
def setUp(self):
self.completed_data = {
'cardholder_name': 'test',
'street_address': 'street name',
'city': 'MyCity',
'postal_code': '32123123123123',

View file

@ -28,8 +28,8 @@ class BaseTestCase(TestCase):
# Users
self.customer, self.another_customer = mommy.make(
'membership.CustomUser',
_quantity=2)
'membership.CustomUser', validated=1, _quantity=2
)
self.customer.set_password(self.dummy_password)
self.customer.save()
self.another_customer.set_password(self.dummy_password)
@ -97,6 +97,9 @@ class BaseTestCase(TestCase):
return view
@skipIf(settings.STRIPE_API_PRIVATE_KEY_TEST is None or
settings.STRIPE_API_PRIVATE_KEY_TEST is "",
"""Skip because STRIPE_API_PRIVATE_KEY_TEST is not set""")
class TestStripeCustomerDescription(TestCase):
"""
A class to test setting the description field of the stripe customer
@ -139,6 +142,10 @@ class TestStripeCustomerDescription(TestCase):
self.assertEqual(customer_data.description, self.customer_name)
@skipIf(settings.STRIPE_API_PRIVATE_KEY_TEST == "" or
settings.TEST_MANAGE_SSH_KEY_HOST == "",
"""Skipping test_save_ssh_key_add because either host
or public key were not specified or were empty""")
class StripePlanTestCase(TestStripeCustomerDescription):
"""
A class to test Stripe plans
@ -161,6 +168,10 @@ class StripePlanTestCase(TestStripeCustomerDescription):
self.assertIsNone(stripe_plan.get('error'))
self.assertIsInstance(stripe_plan.get('response_object'), StripePlan)
@skipIf(settings.TEST_MANAGE_SSH_KEY_PUBKEY == "" or
settings.TEST_MANAGE_SSH_KEY_HOST == "",
"""Skipping test_save_ssh_key_add because either host
or public key were not specified or were empty""")
@patch('utils.stripe_utils.logger')
def test_create_duplicate_plans_error_handling(self, mock_logger):
"""
@ -254,10 +265,10 @@ class SaveSSHKeyTestCase(TestCase):
self.public_key = settings.TEST_MANAGE_SSH_KEY_PUBKEY
self.hosts = settings.TEST_MANAGE_SSH_KEY_HOST
@skipIf(settings.TEST_MANAGE_SSH_KEY_PUBKEY is None or
settings.TEST_MANAGE_SSH_KEY_PUBKEY == "" or
settings.TEST_MANAGE_SSH_KEY_HOST is None or
settings.TEST_MANAGE_SSH_KEY_HOST is "",
@skipIf(settings.TEST_MANAGE_SSH_KEY_PUBKEY is "" or
settings.TEST_MANAGE_SSH_KEY_PUBKEY is None or
settings.TEST_MANAGE_SSH_KEY_HOST is "" or
settings.TEST_MANAGE_SSH_KEY_HOST is None,
"""Skipping test_save_ssh_key_add because either host
or public key were not specified or were empty""")
def test_save_ssh_key_add(self):