Compare commits
3 commits
master
...
show-hosti
Author | SHA1 | Date | |
---|---|---|---|
|
e51af13a31 | ||
|
c6f05889ff | ||
|
ac139c8a99 |
22 changed files with 166 additions and 246 deletions
.dockerignoreChangelogDockerfileMakefile
datacenterlight
digitalglarus/locale/de/LC_MESSAGES
dynamicweb/settings
hosting
release.shrequirements.txttemplates
utils
|
@ -1 +0,0 @@
|
||||||
.git
|
|
|
@ -1,6 +1,3 @@
|
||||||
3.2: 2021-02-07
|
|
||||||
* 8816: Update order confirmation text to better prepared for payment dispute
|
|
||||||
* supportticket#22990: Fix: can't add a deleted card
|
|
||||||
3.1: 2021-01-11
|
3.1: 2021-01-11
|
||||||
* 8781: Fix error is setting a default card (MR!746)
|
* 8781: Fix error is setting a default card (MR!746)
|
||||||
3.0: 2021-01-07
|
3.0: 2021-01-07
|
||||||
|
|
18
Dockerfile
18
Dockerfile
|
@ -1,18 +0,0 @@
|
||||||
FROM python:3.10.0-alpine3.15
|
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
|
||||||
|
|
||||||
RUN apk add --update --no-cache \
|
|
||||||
git \
|
|
||||||
build-base \
|
|
||||||
openldap-dev \
|
|
||||||
python3-dev \
|
|
||||||
libpq-dev \
|
|
||||||
&& rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
# FIX https://github.com/python-ldap/python-ldap/issues/432
|
|
||||||
RUN echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so
|
|
||||||
|
|
||||||
COPY requirements.txt ./
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
COPY ./ .
|
|
6
Makefile
6
Makefile
|
@ -14,12 +14,6 @@ help:
|
||||||
@echo ' make rsync_upload '
|
@echo ' make rsync_upload '
|
||||||
@echo ' make install_debian_packages '
|
@echo ' make install_debian_packages '
|
||||||
|
|
||||||
buildimage:
|
|
||||||
docker build -t dynamicweb:$$(git describe) .
|
|
||||||
|
|
||||||
releaseimage: buildimage
|
|
||||||
./release.sh
|
|
||||||
|
|
||||||
collectstatic:
|
collectstatic:
|
||||||
$(PY?) $(BASEDIR)/manage.py collectstatic
|
$(PY?) $(BASEDIR)/manage.py collectstatic
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ from cms.admin.placeholderadmin import PlaceholderAdminMixin
|
||||||
from cms.extensions import PageExtensionAdmin
|
from cms.extensions import PageExtensionAdmin
|
||||||
from .cms_models import CMSIntegration, CMSFaviconExtension
|
from .cms_models import CMSIntegration, CMSFaviconExtension
|
||||||
from .models import VMPricing, VMTemplate
|
from .models import VMPricing, VMTemplate
|
||||||
|
from hosting.models import UserHostingKey
|
||||||
|
|
||||||
|
|
||||||
class CMSIntegrationAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
|
class CMSIntegrationAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
|
||||||
|
@ -17,3 +18,4 @@ admin.site.register(CMSIntegration, CMSIntegrationAdmin)
|
||||||
admin.site.register(CMSFaviconExtension, CMSFaviconExtensionAdmin)
|
admin.site.register(CMSFaviconExtension, CMSFaviconExtensionAdmin)
|
||||||
admin.site.register(VMPricing)
|
admin.site.register(VMPricing)
|
||||||
admin.site.register(VMTemplate)
|
admin.site.register(VMTemplate)
|
||||||
|
admin.site.register(UserHostingKey)
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-07 11:10+0000\n"
|
"POT-Creation-Date: 2020-03-24 07:02+0000\n"
|
||||||
"PO-Revision-Date: 2018-03-30 23:22+0000\n"
|
"PO-Revision-Date: 2018-03-30 23:22+0000\n"
|
||||||
"Last-Translator: b'Anonymous User <coder.purple+25@gmail.com>'\n"
|
"Last-Translator: b'Anonymous User <coder.purple+25@gmail.com>'\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -451,43 +451,38 @@ msgstr "Dein Gesamtpreis"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" By clicking \"Place order\" you agree to our <a href=\"https://"
|
"By clicking \"Place order\" this plan will charge your credit card account "
|
||||||
"datacenterlight.ch/en-us/cms/terms-of-service/\">Terms of Service</a> and "
|
"with %(total_price)s CHF/year"
|
||||||
"this plan will charge your credit card account with %(total_price)s CHF/year"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Indem Du auf \"Bestellung aufgeben\" klickst, erklärst Du dich mit unseren <a href=\"https://"
|
"Wenn Du \"bestellen\" auswählst, wird Deine Kreditkarte mit %(total_price)s "
|
||||||
"datacenterlight.ch/en-us/cms/terms-of-service/\">Nutzungsbedingungen</a> einverstanden und Dein Kreditkartenkonto wird mit %(total_price)s CHF/Jahr belastet."
|
"CHF pro Jahr belastet"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"By clicking \"Place order\" this plan will charge your credit card account "
|
||||||
" By clicking \"Place order\" you agree to "
|
"with %(total_price)s CHF/month"
|
||||||
"our <a href=\"https://datacenterlight.ch/en-us/cms/terms-of-service/\">Terms "
|
|
||||||
"of Service</a> and this plan will charge your credit card account with "
|
|
||||||
"%(total_price)s CHF/month"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"\n"
|
"Wenn Du \"bestellen\" auswählst, wird Deine Kreditkarte mit %(total_price)s "
|
||||||
"Indem Du auf \"Bestellung aufgeben\" klickst, erklärst Du dich mit unseren <a href=\"https://"
|
"CHF pro Monat belastet"
|
||||||
"datacenterlight.ch/en-us/cms/terms-of-service/\">Nutzungsbedingungen</a> einverstanden und Dein Kreditkartenkonto wird mit %(total_price)s CHF/Monat belastet."
|
|
||||||
|
#, fuzzy, python-format
|
||||||
|
#| msgid ""
|
||||||
|
#| "By clicking \"Place order\" this payment will charge your credit card "
|
||||||
|
#| "account with a one time amount of %(total_price)s CHF"
|
||||||
|
msgid ""
|
||||||
|
"By clicking \"Place order\" this payment will charge your credit card "
|
||||||
|
"account with a one time amount of %(total_price)s CHF"
|
||||||
|
msgstr ""
|
||||||
|
"Wenn Du \"bestellen\" auswählst, wird Deine Kreditkarte mit "
|
||||||
|
"%(vm_total_price)s CHF pro Monat belastet"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"By clicking \"Place order\" you agree to our <a href=\"https://"
|
"By clicking \"Place order\" this plan will charge your credit card account "
|
||||||
"datacenterlight.ch/en-us/cms/terms-of-service/\">Terms of Service</a> and "
|
"with %(vm_total_price)s CHF/month"
|
||||||
"this plan will charge your credit card account with %(total_price)s CHF"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Indem Du auf \"Bestellung aufgeben\" klickst, erklärst Du dich mit unseren <a href=\"https://"
|
"Wenn Du \"bestellen\" auswählst, wird Deine Kreditkarte mit "
|
||||||
"datacenterlight.ch/de/cms/terms-of-service/\">Nutzungsbedingungen</a> einverstanden und Dein Kreditkartenkonto wird mit %(total_price)s CHF belastet."
|
"%(vm_total_price)s CHF pro Monat belastet"
|
||||||
|
|
||||||
#, python-format
|
|
||||||
msgid ""
|
|
||||||
"By clicking \"Place order\" you agree to our <a href=\"https://"
|
|
||||||
"datacenterlight.ch/en-us/cms/terms-of-service/\">Terms of Service</a> and "
|
|
||||||
"this plan will charge your credit card account with %(vm_total_price)s CHF/"
|
|
||||||
"month"
|
|
||||||
msgstr ""
|
|
||||||
"Indem Du auf \"Bestellung aufgeben\" klickst, erklärst Du dich mit unseren <a href=\"https://"
|
|
||||||
"datacenterlight.ch/de/cms/terms-of-service/\">Nutzungsbedingungen</a> einverstanden und Dein Kreditkartenkonto wird mit %(vm_total_price)s CHF/Monat belastet"
|
|
||||||
|
|
||||||
msgid "Place order"
|
msgid "Place order"
|
||||||
msgstr "Bestellen"
|
msgstr "Bestellen"
|
||||||
|
@ -606,22 +601,16 @@ msgid "Incorrect pricing name. Please contact support{support_email}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ungültige Preisbezeichnung. Bitte kontaktiere den Support{support_email}"
|
"Ungültige Preisbezeichnung. Bitte kontaktiere den Support{support_email}"
|
||||||
|
|
||||||
|
#, python-brace-format
|
||||||
|
msgid "{user} does not have permission to access the card"
|
||||||
|
msgstr "{user} hat keine Erlaubnis auf diese Karte zuzugreifen"
|
||||||
|
|
||||||
|
msgid "An error occurred. Details: {}"
|
||||||
|
msgstr "Ein Fehler ist aufgetreten. Details: {}"
|
||||||
|
|
||||||
msgid "Confirm Order"
|
msgid "Confirm Order"
|
||||||
msgstr "Bestellung Bestätigen"
|
msgstr "Bestellung Bestätigen"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#| msgid "Thank you!"
|
|
||||||
msgid "Thank you !"
|
|
||||||
msgstr "Vielen Dank!"
|
|
||||||
|
|
||||||
msgid "Your product will be provisioned as soon as we receive the payment."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, python-brace-format
|
|
||||||
msgid "An error occurred while associating the card. Details: {details}"
|
|
||||||
msgstr ""
|
|
||||||
"Beim Verbinden der Karte ist ein Fehler aufgetreten. Details: {details}"
|
|
||||||
|
|
||||||
msgid "Error."
|
msgid "Error."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -632,21 +621,10 @@ msgstr ""
|
||||||
"Es ist ein Fehler bei der Zahlung betreten. Du wirst nach dem Schliessen vom "
|
"Es ist ein Fehler bei der Zahlung betreten. Du wirst nach dem Schliessen vom "
|
||||||
"Popup zur Bezahlseite weitergeleitet."
|
"Popup zur Bezahlseite weitergeleitet."
|
||||||
|
|
||||||
msgid "Thank you for the order."
|
#, python-brace-format
|
||||||
msgstr "Danke für Deine Bestellung."
|
msgid "An error occurred while associating the card. Details: {details}"
|
||||||
|
|
||||||
msgid ""
|
|
||||||
"Your product will be provisioned as soon as we receive a payment "
|
|
||||||
"confirmation from Stripe. We will send you a confirmation email. You can "
|
|
||||||
"always contact us at support@datacenterlight.ch"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Beim Verbinden der Karte ist ein Fehler aufgetreten. Details: {details}"
|
||||||
msgid ""
|
|
||||||
"Your VM will be up and running in a few moments. We will send you a "
|
|
||||||
"confirmation email as soon as it is ready."
|
|
||||||
msgstr ""
|
|
||||||
"Deine VM ist gleich bereit. Wir senden Dir eine Bestätigungsemail, sobald Du "
|
|
||||||
"auf sie zugreifen kannst."
|
|
||||||
|
|
||||||
msgid " This is a monthly recurring plan."
|
msgid " This is a monthly recurring plan."
|
||||||
msgstr "Dies ist ein monatlich wiederkehrender Plan."
|
msgstr "Dies ist ein monatlich wiederkehrender Plan."
|
||||||
|
@ -686,31 +664,15 @@ msgstr ""
|
||||||
"Du wirst bald eine Bestätigungs-E-Mail über die Zahlung erhalten. Du kannst "
|
"Du wirst bald eine Bestätigungs-E-Mail über die Zahlung erhalten. Du kannst "
|
||||||
"jederzeit unter info@ungleich.ch kontaktieren."
|
"jederzeit unter info@ungleich.ch kontaktieren."
|
||||||
|
|
||||||
#, python-format
|
msgid "Thank you for the order."
|
||||||
#~ msgid ""
|
msgstr "Danke für Deine Bestellung."
|
||||||
#~ "By clicking \"Place order\" this plan will charge your credit card "
|
|
||||||
#~ "account with %(total_price)s CHF/month"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "Wenn Du \"bestellen\" auswählst, wird Deine Kreditkarte mit "
|
|
||||||
#~ "%(total_price)s CHF pro Monat belastet"
|
|
||||||
|
|
||||||
#, fuzzy, python-format
|
msgid ""
|
||||||
#~| msgid ""
|
"Your VM will be up and running in a few moments. We will send you a "
|
||||||
#~| "By clicking \"Place order\" this payment will charge your credit card "
|
"confirmation email as soon as it is ready."
|
||||||
#~| "account with a one time amount of %(total_price)s CHF"
|
msgstr ""
|
||||||
#~ msgid ""
|
"Deine VM ist gleich bereit. Wir senden Dir eine Bestätigungsemail, sobald Du "
|
||||||
#~ "By clicking \"Place order\" this payment will charge your credit card "
|
"auf sie zugreifen kannst."
|
||||||
#~ "account with a one time amount of %(total_price)s CHF"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "Wenn Du \"bestellen\" auswählst, wird Deine Kreditkarte mit "
|
|
||||||
#~ "%(vm_total_price)s CHF pro Monat belastet"
|
|
||||||
|
|
||||||
#, python-brace-format
|
|
||||||
#~ msgid "{user} does not have permission to access the card"
|
|
||||||
#~ msgstr "{user} hat keine Erlaubnis auf diese Karte zuzugreifen"
|
|
||||||
|
|
||||||
#~ msgid "An error occurred. Details: {}"
|
|
||||||
#~ msgstr "Ein Fehler ist aufgetreten. Details: {}"
|
|
||||||
|
|
||||||
#~ msgid "Price"
|
#~ msgid "Price"
|
||||||
#~ msgstr "Preise"
|
#~ msgstr "Preise"
|
||||||
|
@ -786,6 +748,9 @@ msgstr ""
|
||||||
#~ "Wir werden dann sobald als möglich Ihren Beta-Zugang erstellen und Sie "
|
#~ "Wir werden dann sobald als möglich Ihren Beta-Zugang erstellen und Sie "
|
||||||
#~ "daraufhin kontaktieren.Bis dahin bitten wir Sie um etwas Geduld."
|
#~ "daraufhin kontaktieren.Bis dahin bitten wir Sie um etwas Geduld."
|
||||||
|
|
||||||
|
#~ msgid "Thank you!"
|
||||||
|
#~ msgstr "Vielen Dank!"
|
||||||
|
|
||||||
#~ msgid "Thank you for order! Our team will contact you via email"
|
#~ msgid "Thank you for order! Our team will contact you via email"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Vielen Dank für die Bestellung. Unser Team setzt sich sobald wie möglich "
|
#~ "Vielen Dank für die Bestellung. Unser Team setzt sich sobald wie möglich "
|
||||||
|
|
|
@ -195,7 +195,7 @@ def handle_metadata_and_emails(order_id, vm_id, manager, user, specs,
|
||||||
email_data = {
|
email_data = {
|
||||||
'subject': settings.DCL_TEXT + " Order from %s" % context['email'],
|
'subject': settings.DCL_TEXT + " Order from %s" % context['email'],
|
||||||
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
||||||
'to': ['dcl-orders@ungleich.ch'],
|
'to': ['info@ungleich.ch'],
|
||||||
'body': "\n".join(
|
'body': "\n".join(
|
||||||
["%s=%s" % (k, v) for (k, v) in context.items()]),
|
["%s=%s" % (k, v) for (k, v) in context.items()]),
|
||||||
'reply_to': [context['email']],
|
'reply_to': [context['email']],
|
||||||
|
@ -233,4 +233,4 @@ def handle_metadata_and_emails(order_id, vm_id, manager, user, specs,
|
||||||
|
|
||||||
logger.debug("New VM ID is {vm_id}".format(vm_id=vm_id))
|
logger.debug("New VM ID is {vm_id}".format(vm_id=vm_id))
|
||||||
if vm_id > 0:
|
if vm_id > 0:
|
||||||
get_or_create_vm_detail(custom_user, manager, vm_id)
|
get_or_create_vm_detail(custom_user, manager, vm_id)
|
|
@ -278,16 +278,15 @@
|
||||||
{% if generic_payment_details %}
|
{% if generic_payment_details %}
|
||||||
{% if generic_payment_details.recurring %}
|
{% if generic_payment_details.recurring %}
|
||||||
{% if generic_payment_details.recurring_interval == 'year' %}
|
{% if generic_payment_details.recurring_interval == 'year' %}
|
||||||
<div class="dcl-place-order-text">{% blocktrans with total_price=generic_payment_details.amount|floatformat:2|intcomma %} By clicking "Place order" you agree to our <a href="https://datacenterlight.ch/en-us/cms/terms-of-service/">Terms of Service</a> and this plan will charge your credit card account with {{ total_price }} CHF/year{% endblocktrans %}.</div>
|
<div class="dcl-place-order-text">{% blocktrans with total_price=generic_payment_details.amount|floatformat:2|intcomma %}By clicking "Place order" this plan will charge your credit card account with {{total_price}} CHF/year{% endblocktrans %}.</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="dcl-place-order-text">{% blocktrans with total_price=generic_payment_details.amount|floatformat:2|intcomma %}
|
<div class="dcl-place-order-text">{% blocktrans with total_price=generic_payment_details.amount|floatformat:2|intcomma %}By clicking "Place order" this plan will charge your credit card account with {{total_price}} CHF/month{% endblocktrans %}.</div>
|
||||||
By clicking "Place order" you agree to our <a href="https://datacenterlight.ch/en-us/cms/terms-of-service/">Terms of Service</a> and this plan will charge your credit card account with {{ total_price }} CHF/month{% endblocktrans %}.</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="dcl-place-order-text">{% blocktrans with total_price=generic_payment_details.amount|floatformat:2|intcomma %}By clicking "Place order" you agree to our <a href="https://datacenterlight.ch/en-us/cms/terms-of-service/">Terms of Service</a> and this plan will charge your credit card account with {{ total_price }} CHF{% endblocktrans %}.</div>
|
<div class="dcl-place-order-text">{% blocktrans with total_price=generic_payment_details.amount|floatformat:2|intcomma %}By clicking "Place order" this payment will charge your credit card account with a one time amount of {{total_price}} CHF{% endblocktrans %}.</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="dcl-place-order-text">{% blocktrans with vm_total_price=vm.total_price|floatformat:2|intcomma %}By clicking "Place order" you agree to our <a href="https://datacenterlight.ch/en-us/cms/terms-of-service/">Terms of Service</a> and this plan will charge your credit card account with {{ vm_total_price }} CHF/month{% endblocktrans %}.</div>
|
<div class="dcl-place-order-text">{% blocktrans with vm_total_price=vm.total_price|floatformat:2|intcomma %}By clicking "Place order" this plan will charge your credit card account with {{vm_total_price}} CHF/month{% endblocktrans %}.</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 order-confirm-btn text-right">
|
<div class="col-sm-4 order-confirm-btn text-right">
|
||||||
|
|
|
@ -20,7 +20,7 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
eu_countries = ['at', 'be', 'bg', 'ch', 'cy', 'cz', 'hr', 'dk',
|
eu_countries = ['at', 'be', 'bg', 'ch', 'cy', 'cz', 'hr', 'dk',
|
||||||
'ee', 'fi', 'fr', 'mc', 'de', 'gr', 'hu', 'ie', 'it',
|
'ee', 'fi', 'fr', 'mc', 'de', 'gr', 'hu', 'ie', 'it',
|
||||||
'lv', 'lu', 'mt', 'nl', 'pl', 'pt', 'ro','sk', 'si', 'es',
|
'lv', 'lu', 'mt', 'nl', 'po', 'pt', 'ro','sk', 'si', 'es',
|
||||||
'se', 'gb']
|
'se', 'gb']
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1333,7 +1333,7 @@ def do_provisioning_generic(
|
||||||
'subject': (settings.DCL_TEXT +
|
'subject': (settings.DCL_TEXT +
|
||||||
" Payment received from %s" % context['email']),
|
" Payment received from %s" % context['email']),
|
||||||
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
||||||
'to': ['dcl-orders@ungleich.ch'],
|
'to': ['info@ungleich.ch'],
|
||||||
'body': "\n".join(
|
'body': "\n".join(
|
||||||
["%s=%s" % (k, v) for (k, v) in context.items()]),
|
["%s=%s" % (k, v) for (k, v) in context.items()]),
|
||||||
'reply_to': [context['email']],
|
'reply_to': [context['email']],
|
||||||
|
@ -1507,7 +1507,7 @@ def do_provisioning(request, stripe_api_cus_id, card_details_response,
|
||||||
'subject': (settings.DCL_TEXT +
|
'subject': (settings.DCL_TEXT +
|
||||||
" Payment received from %s" % context['email']),
|
" Payment received from %s" % context['email']),
|
||||||
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
||||||
'to': ['dcl-orders@ungleich.ch'],
|
'to': ['info@ungleich.ch'],
|
||||||
'body': "\n".join(
|
'body': "\n".join(
|
||||||
["%s=%s" % (k, v) for (k, v) in context.items()]),
|
["%s=%s" % (k, v) for (k, v) in context.items()]),
|
||||||
'reply_to': [context['email']],
|
'reply_to': [context['email']],
|
||||||
|
|
|
@ -376,6 +376,8 @@ msgid ""
|
||||||
" digitalglarus.ch<br/>\n"
|
" digitalglarus.ch<br/>\n"
|
||||||
" hack4lgarus.ch<br/>\n"
|
" hack4lgarus.ch<br/>\n"
|
||||||
" ipv6onlyhosting.com<br/>\n"
|
" ipv6onlyhosting.com<br/>\n"
|
||||||
|
" ipv6onlyhosting.ch<br/>\n"
|
||||||
|
" ipv6onlyhosting.net<br/>\n"
|
||||||
" django-hosting.ch<br/>\n"
|
" django-hosting.ch<br/>\n"
|
||||||
" rails-hosting.ch<br/>\n"
|
" rails-hosting.ch<br/>\n"
|
||||||
" node-hosting.ch<br/>\n"
|
" node-hosting.ch<br/>\n"
|
||||||
|
@ -634,8 +636,8 @@ msgstr ""
|
||||||
"Internetangebot der ungleich glarus ag, welches unter den nachfolgenden "
|
"Internetangebot der ungleich glarus ag, welches unter den nachfolgenden "
|
||||||
"Domains erreichbar ist:<br/><br/>ungleich.ch<br/>datacenterlight.ch<br/"
|
"Domains erreichbar ist:<br/><br/>ungleich.ch<br/>datacenterlight.ch<br/"
|
||||||
">devuanhosting.com<br/>devuanhosting.ch<br/>digitalglarus.ch<br/>hack4lgarus."
|
">devuanhosting.com<br/>devuanhosting.ch<br/>digitalglarus.ch<br/>hack4lgarus."
|
||||||
"ch<br/>ipv6onlyhosting.com<br/>django-hosting.ch<br/>rails-hosting.ch"
|
"ch<br/>ipv6onlyhosting.com<br/>ipv6onlyhosting.ch<br/>ipv6onlyhosting.net<br/"
|
||||||
"<br/>node-hosting.ch<br/>blog."
|
">django-hosting.ch<br/>rails-hosting.ch<br/>node-hosting.ch<br/>blog."
|
||||||
"ungleich.ch<br/><br/>Der Datenschutzbeauftragte des Verantwortlichen ist:<br/"
|
"ungleich.ch<br/><br/>Der Datenschutzbeauftragte des Verantwortlichen ist:<br/"
|
||||||
"><br/>Sanghee Kim<br/>ungleich glarus ag<br/>Bahnhofstrasse 1<br/>8783 "
|
"><br/>Sanghee Kim<br/>ungleich glarus ag<br/>Bahnhofstrasse 1<br/>8783 "
|
||||||
"Linthal (CH)<br/>E-Mail: <a href=\"mailto:sanghee.kim@ungleich.ch\">sanghee."
|
"Linthal (CH)<br/>E-Mail: <a href=\"mailto:sanghee.kim@ungleich.ch\">sanghee."
|
||||||
|
@ -836,4 +838,3 @@ msgstr ""
|
||||||
|
|
||||||
#~ msgid "index/?$"
|
#~ msgid "index/?$"
|
||||||
#~ msgstr "index/?$"
|
#~ msgstr "index/?$"
|
||||||
|
|
||||||
|
|
|
@ -79,9 +79,9 @@ SECRET_KEY = env('DJANGO_SECRET_KEY')
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
# 1st migrate
|
# 1st migrate
|
||||||
|
'hosting',
|
||||||
'membership',
|
'membership',
|
||||||
'djangocms_admin_style',
|
'djangocms_admin_style',
|
||||||
'django.contrib.admin',
|
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.humanize',
|
'django.contrib.humanize',
|
||||||
|
@ -144,7 +144,6 @@ INSTALLED_APPS = (
|
||||||
# ungleich
|
# ungleich
|
||||||
'ungleich',
|
'ungleich',
|
||||||
'ungleich_page',
|
'ungleich_page',
|
||||||
'hosting',
|
|
||||||
'digitalglarus',
|
'digitalglarus',
|
||||||
'nosystemd',
|
'nosystemd',
|
||||||
'datacenterlight',
|
'datacenterlight',
|
||||||
|
@ -154,6 +153,7 @@ INSTALLED_APPS = (
|
||||||
'opennebula_api',
|
'opennebula_api',
|
||||||
'django_celery_results',
|
'django_celery_results',
|
||||||
'webhook',
|
'webhook',
|
||||||
|
'django.contrib.admin',
|
||||||
)
|
)
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
MIDDLEWARE_CLASSES = (
|
||||||
|
@ -196,6 +196,7 @@ TEMPLATES = [
|
||||||
os.path.join(PROJECT_DIR, 'cms_templates/'),
|
os.path.join(PROJECT_DIR, 'cms_templates/'),
|
||||||
os.path.join(PROJECT_DIR, 'cms_templates/djangocms_blog/'),
|
os.path.join(PROJECT_DIR, 'cms_templates/djangocms_blog/'),
|
||||||
os.path.join(PROJECT_DIR, 'templates/gdpr'),
|
os.path.join(PROJECT_DIR, 'templates/gdpr'),
|
||||||
|
os.path.join(PROJECT_DIR, 'templates'),
|
||||||
],
|
],
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
|
@ -631,6 +632,8 @@ GOOGLE_ANALYTICS_PROPERTY_IDS = {
|
||||||
'datacenterlight.ch': 'UA-62285904-8',
|
'datacenterlight.ch': 'UA-62285904-8',
|
||||||
'devuanhosting.ch': 'UA-62285904-9',
|
'devuanhosting.ch': 'UA-62285904-9',
|
||||||
'devuanhosting.com': 'UA-62285904-9',
|
'devuanhosting.com': 'UA-62285904-9',
|
||||||
|
'ipv6onlyhosting.ch': 'UA-62285904-10',
|
||||||
|
'ipv6onlyhosting.net': 'UA-62285904-10',
|
||||||
'ipv6onlyhosting.com': 'UA-62285904-10',
|
'ipv6onlyhosting.com': 'UA-62285904-10',
|
||||||
'comic.ungleich.ch': 'UA-62285904-13',
|
'comic.ungleich.ch': 'UA-62285904-13',
|
||||||
'127.0.0.1:8000': 'localhost',
|
'127.0.0.1:8000': 'localhost',
|
||||||
|
|
|
@ -28,7 +28,9 @@ ALLOWED_HOSTS = [
|
||||||
".devuanhosting.ch",
|
".devuanhosting.ch",
|
||||||
".devuanhosting.com",
|
".devuanhosting.com",
|
||||||
".digitalezukunft.ch",
|
".digitalezukunft.ch",
|
||||||
|
".ipv6onlyhosting.ch",
|
||||||
".ipv6onlyhosting.com",
|
".ipv6onlyhosting.com",
|
||||||
|
".ipv6onlyhosting.net",
|
||||||
".digitalglarus.ch",
|
".digitalglarus.ch",
|
||||||
".hack4glarus.ch",
|
".hack4glarus.ch",
|
||||||
".xn--nglarus-n2a.ch"
|
".xn--nglarus-n2a.ch"
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-07 10:19+0000\n"
|
"POT-Creation-Date: 2019-11-15 16:40+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -211,9 +211,6 @@ msgstr "Bezahlbares VM Hosting in der Schweiz"
|
||||||
msgid "My Dashboard"
|
msgid "My Dashboard"
|
||||||
msgstr "Mein Dashboard"
|
msgstr "Mein Dashboard"
|
||||||
|
|
||||||
msgid "Welcome"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "My VMs"
|
msgid "My VMs"
|
||||||
msgstr "Meine VMs"
|
msgstr "Meine VMs"
|
||||||
|
|
||||||
|
@ -367,11 +364,6 @@ msgstr "Abgelehnt"
|
||||||
msgid "Billed to"
|
msgid "Billed to"
|
||||||
msgstr "Rechnungsadresse"
|
msgstr "Rechnungsadresse"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#| msgid "Card Number"
|
|
||||||
msgid "VAT Number"
|
|
||||||
msgstr "Kreditkartennummer"
|
|
||||||
|
|
||||||
msgid "Payment method"
|
msgid "Payment method"
|
||||||
msgstr "Bezahlmethode"
|
msgstr "Bezahlmethode"
|
||||||
|
|
||||||
|
@ -399,9 +391,6 @@ msgstr "Festplattenkapazität"
|
||||||
msgid "Subtotal"
|
msgid "Subtotal"
|
||||||
msgstr "Zwischensumme"
|
msgstr "Zwischensumme"
|
||||||
|
|
||||||
msgid "VAT for"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "VAT"
|
msgid "VAT"
|
||||||
msgstr "Mehrwertsteuer"
|
msgstr "Mehrwertsteuer"
|
||||||
|
|
||||||
|
@ -435,22 +424,18 @@ msgstr "ZURÜCK ZUR LISTE"
|
||||||
msgid "Some problem encountered. Please try again later."
|
msgid "Some problem encountered. Please try again later."
|
||||||
msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal."
|
msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal."
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#| msgid "Description"
|
|
||||||
msgid "Subscriptions"
|
|
||||||
msgstr "Beschreibung"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#| msgid "One time payment"
|
|
||||||
msgid "One-time payments"
|
|
||||||
msgstr "Einmalzahlung"
|
|
||||||
|
|
||||||
msgid "VM ID"
|
msgid "VM ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "IP Address"
|
msgid "IP Address"
|
||||||
msgstr "IP-Adresse"
|
msgstr "IP-Adresse"
|
||||||
|
|
||||||
|
msgid "See Invoice"
|
||||||
|
msgstr "Siehe Rechnung"
|
||||||
|
|
||||||
|
msgid "Page"
|
||||||
|
msgstr "Seite"
|
||||||
|
|
||||||
msgid "Log in"
|
msgid "Log in"
|
||||||
msgstr "Anmelden"
|
msgstr "Anmelden"
|
||||||
|
|
||||||
|
@ -495,13 +480,11 @@ msgstr "Bestellungsübersicht"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"By clicking \"Place order\" you agree to our <a href=\"https://"
|
"By clicking \"Place order\" this plan will charge your credit card account "
|
||||||
"datacenterlight.ch/en-us/cms/terms-of-service/\">Terms of Service</a> and "
|
"with %(vm_price)s CHF/month"
|
||||||
"this plan will charge your credit card account with %(vm_price)s CHF/month."
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Indem Du auf \"Bestellung aufgeben\" klickst, erklärst Du dich mit unseren"
|
"Wenn Du \"bestellen\" auswählst, wird Deine Kreditkarte mit %(vm_price)s CHF "
|
||||||
" <a href=\"https://"
|
"pro Monat belastet"
|
||||||
"datacenterlight.ch/de/cms/terms-of-service/\">Nutzungsbedingungen</a> einverstanden und Dein Kreditkartenkonto wird mit %(vm_price)s CHF/Monat belastet."
|
|
||||||
|
|
||||||
msgid "Place order"
|
msgid "Place order"
|
||||||
msgstr "Bestellen"
|
msgstr "Bestellen"
|
||||||
|
@ -521,12 +504,6 @@ msgstr "Schliessen"
|
||||||
msgid "Order Nr."
|
msgid "Order Nr."
|
||||||
msgstr "Bestellung Nr."
|
msgstr "Bestellung Nr."
|
||||||
|
|
||||||
msgid "See Invoice"
|
|
||||||
msgstr "Siehe Rechnung"
|
|
||||||
|
|
||||||
msgid "Page"
|
|
||||||
msgstr "Seite"
|
|
||||||
|
|
||||||
msgid "Your Order"
|
msgid "Your Order"
|
||||||
msgstr "Deine Bestellung"
|
msgstr "Deine Bestellung"
|
||||||
|
|
||||||
|
@ -595,19 +572,6 @@ msgstr "Absenden"
|
||||||
msgid "Password reset"
|
msgid "Password reset"
|
||||||
msgstr "Passwort zurücksetzen"
|
msgstr "Passwort zurücksetzen"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#| msgid "Key name"
|
|
||||||
msgid "My Username"
|
|
||||||
msgstr "Key-Name"
|
|
||||||
|
|
||||||
msgid "Your VAT number has been verified"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid ""
|
|
||||||
"Your VAT number is under validation. VAT will be adjusted, once the "
|
|
||||||
"validation is complete."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "UPDATE"
|
msgid "UPDATE"
|
||||||
msgstr "AKTUALISIEREN"
|
msgstr "AKTUALISIEREN"
|
||||||
|
|
||||||
|
@ -809,15 +773,21 @@ msgstr "Dein Passwort konnte nicht zurückgesetzt werden."
|
||||||
msgid "The reset password link is no longer valid."
|
msgid "The reset password link is no longer valid."
|
||||||
msgstr "Der Link zum Zurücksetzen Deines Passwortes ist nicht mehr gültig."
|
msgstr "Der Link zum Zurücksetzen Deines Passwortes ist nicht mehr gültig."
|
||||||
|
|
||||||
msgid "Could not set a default card."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Card deassociation successful"
|
msgid "Card deassociation successful"
|
||||||
msgstr "Die Verbindung mit der Karte wurde erfolgreich aufgehoben"
|
msgstr "Die Verbindung mit der Karte wurde erfolgreich aufgehoben"
|
||||||
|
|
||||||
|
msgid "You are not permitted to do this operation"
|
||||||
|
msgstr "Du hast keine Erlaubnis um diese Operation durchzuführen"
|
||||||
|
|
||||||
|
msgid "The selected card does not exist"
|
||||||
|
msgstr "Die ausgewählte Karte existiert nicht"
|
||||||
|
|
||||||
msgid "Billing address updated successfully"
|
msgid "Billing address updated successfully"
|
||||||
msgstr "Die Rechnungsadresse wurde erfolgreich aktualisiert"
|
msgstr "Die Rechnungsadresse wurde erfolgreich aktualisiert"
|
||||||
|
|
||||||
|
msgid "You seem to have already added this card"
|
||||||
|
msgstr "Es scheint, als hättest du diese Karte bereits hinzugefügt"
|
||||||
|
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "An error occurred while associating the card. Details: {details}"
|
msgid "An error occurred while associating the card. Details: {details}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -882,8 +852,7 @@ msgstr "Ungültige Speicher-Grösse"
|
||||||
|
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Incorrect pricing name. Please contact support{support_email}"
|
msgid "Incorrect pricing name. Please contact support{support_email}"
|
||||||
msgstr ""
|
msgstr "Ungültige Preisbezeichnung. Bitte kontaktiere den Support{support_email}"
|
||||||
"Ungültige Preisbezeichnung. Bitte kontaktiere den Support{support_email}"
|
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"We could not find the requested VM. Please "
|
"We could not find the requested VM. Please "
|
||||||
|
@ -902,9 +871,7 @@ msgstr "Fehler beenden VM"
|
||||||
msgid ""
|
msgid ""
|
||||||
"VM terminate action timed out. Please contact support@datacenterlight.ch for "
|
"VM terminate action timed out. Please contact support@datacenterlight.ch for "
|
||||||
"further information."
|
"further information."
|
||||||
msgstr ""
|
msgstr "VM beendet wegen Zeitüberschreitung. Bitte kontaktiere support@datacenterlight.ch für weitere Informationen."
|
||||||
"VM beendet wegen Zeitüberschreitung. Bitte kontaktiere "
|
|
||||||
"support@datacenterlight.ch für weitere Informationen."
|
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Virtual Machine %(vm_name)s Cancelled"
|
msgid "Virtual Machine %(vm_name)s Cancelled"
|
||||||
|
@ -915,15 +882,6 @@ msgstr ""
|
||||||
"Es gab einen Fehler bei der Bearbeitung Deine Anfrage. Bitte versuche es "
|
"Es gab einen Fehler bei der Bearbeitung Deine Anfrage. Bitte versuche es "
|
||||||
"noch einmal."
|
"noch einmal."
|
||||||
|
|
||||||
#~ msgid "You are not permitted to do this operation"
|
|
||||||
#~ msgstr "Du hast keine Erlaubnis um diese Operation durchzuführen"
|
|
||||||
|
|
||||||
#~ msgid "The selected card does not exist"
|
|
||||||
#~ msgstr "Die ausgewählte Karte existiert nicht"
|
|
||||||
|
|
||||||
#~ msgid "You seem to have already added this card"
|
|
||||||
#~ msgstr "Es scheint, als hättest du diese Karte bereits hinzugefügt"
|
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
#~ msgid "This key exists already with the name \"%(name)s\""
|
#~ msgid "This key exists already with the name \"%(name)s\""
|
||||||
#~ msgstr "Der SSH-Key mit dem Name \"%(name)s\" existiert bereits"
|
#~ msgstr "Der SSH-Key mit dem Name \"%(name)s\" existiert bereits"
|
||||||
|
|
|
@ -208,6 +208,25 @@ class UserHostingKey(models.Model):
|
||||||
created_at = models.DateTimeField(auto_now_add=True)
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
name = models.CharField(max_length=100)
|
name = models.CharField(max_length=100)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
username = "None"
|
||||||
|
email = "None"
|
||||||
|
if self.user:
|
||||||
|
username = self.user.username
|
||||||
|
email = self.user.email
|
||||||
|
display_str = '''Username: %s,
|
||||||
|
Email: %s,
|
||||||
|
Key name: %s,
|
||||||
|
Created at: %s,
|
||||||
|
Public Key: %s''' % (
|
||||||
|
username,
|
||||||
|
email,
|
||||||
|
self.name,
|
||||||
|
self.created_at,
|
||||||
|
self.public_key
|
||||||
|
)
|
||||||
|
return display_str
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def generate_RSA(bits=2048):
|
def generate_RSA(bits=2048):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -218,7 +218,7 @@
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="dcl-place-order-text">{% blocktrans with vm_price=vm.total_price|floatformat:2|intcomma %}By clicking "Place order" you agree to our <a href="https://datacenterlight.ch/en-us/cms/terms-of-service/">Terms of Service</a> and this plan will charge your credit card account with {{ vm_price }} CHF/month.{% endblocktrans %}.</div>
|
<div class="dcl-place-order-text">{% blocktrans with vm_price=vm.total_price|floatformat:2|intcomma %}By clicking "Place order" this plan will charge your credit card account with {{ vm_price }} CHF/month{% endblocktrans %}.</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 order-confirm-btn text-right">
|
<div class="col-sm-4 order-confirm-btn text-right">
|
||||||
<button class="btn choice-btn" id="btn-create-vm" data-href="{% url 'hosting:order-confirmation' %}" data-toggle="modal" data-target="#createvm-modal">
|
<button class="btn choice-btn" id="btn-create-vm" data-href="{% url 'hosting:order-confirmation' %}" data-toggle="modal" data-target="#createvm-modal">
|
||||||
|
|
|
@ -698,37 +698,39 @@ class SettingsView(LoginRequiredMixin, FormView):
|
||||||
email=request.user.email, id_payment_method=id_payment_method
|
email=request.user.email, id_payment_method=id_payment_method
|
||||||
)
|
)
|
||||||
card = card_details['response_object']
|
card = card_details['response_object']
|
||||||
acc_result = stripe_utils.associate_customer_card(
|
if UserCardDetail.get_user_card_details(stripe_customer, card):
|
||||||
request.user.stripecustomer.stripe_id,
|
msg = _('You seem to have already added this card')
|
||||||
id_payment_method,
|
|
||||||
set_as_default=True
|
|
||||||
)
|
|
||||||
if acc_result['response_object'] is None:
|
|
||||||
msg = _(
|
|
||||||
'An error occurred while associating the card.'
|
|
||||||
' Details: {details}'.format(
|
|
||||||
details=acc_result['error']
|
|
||||||
)
|
|
||||||
)
|
|
||||||
messages.add_message(request, messages.ERROR, msg)
|
messages.add_message(request, messages.ERROR, msg)
|
||||||
return self.render_to_response(self.get_context_data())
|
else:
|
||||||
preferred = False
|
acc_result = stripe_utils.associate_customer_card(
|
||||||
if stripe_customer.usercarddetail_set.count() == 0:
|
request.user.stripecustomer.stripe_id, id_payment_method
|
||||||
preferred = True
|
)
|
||||||
UserCardDetail.create(
|
if acc_result['response_object'] is None:
|
||||||
stripe_customer=stripe_customer,
|
msg = _(
|
||||||
last4=card['last4'],
|
'An error occurred while associating the card.'
|
||||||
brand=card['brand'],
|
' Details: {details}'.format(
|
||||||
fingerprint=card['fingerprint'],
|
details=acc_result['error']
|
||||||
exp_month=card['exp_month'],
|
)
|
||||||
exp_year=card['exp_year'],
|
)
|
||||||
card_id=card['card_id'],
|
messages.add_message(request, messages.ERROR, msg)
|
||||||
preferred=preferred
|
return self.render_to_response(self.get_context_data())
|
||||||
)
|
preferred = False
|
||||||
msg = _(
|
if stripe_customer.usercarddetail_set.count() == 0:
|
||||||
"Successfully associated the card with your account"
|
preferred = True
|
||||||
)
|
UserCardDetail.create(
|
||||||
messages.add_message(request, messages.SUCCESS, msg)
|
stripe_customer=stripe_customer,
|
||||||
|
last4=card['last4'],
|
||||||
|
brand=card['brand'],
|
||||||
|
fingerprint=card['fingerprint'],
|
||||||
|
exp_month=card['exp_month'],
|
||||||
|
exp_year=card['exp_year'],
|
||||||
|
card_id=card['card_id'],
|
||||||
|
preferred=preferred
|
||||||
|
)
|
||||||
|
msg = _(
|
||||||
|
"Successfully associated the card with your account"
|
||||||
|
)
|
||||||
|
messages.add_message(request, messages.SUCCESS, msg)
|
||||||
return self.render_to_response(self.get_context_data())
|
return self.render_to_response(self.get_context_data())
|
||||||
else:
|
else:
|
||||||
billing_address_data = form.cleaned_data
|
billing_address_data = form.cleaned_data
|
||||||
|
@ -1315,8 +1317,7 @@ class InvoiceListView(LoginRequiredMixin, TemplateView):
|
||||||
logger.debug("User does not exist")
|
logger.debug("User does not exist")
|
||||||
cu = self.request.user
|
cu = self.request.user
|
||||||
invs = stripe.Invoice.list(customer=cu.stripecustomer.stripe_id,
|
invs = stripe.Invoice.list(customer=cu.stripecustomer.stripe_id,
|
||||||
count=100,
|
count=100)
|
||||||
status='paid')
|
|
||||||
paginator = Paginator(invs.data, 10)
|
paginator = Paginator(invs.data, 10)
|
||||||
try:
|
try:
|
||||||
invs_page = paginator.page(page)
|
invs_page = paginator.page(page)
|
||||||
|
@ -1911,7 +1912,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
||||||
'subject': ("Deleted " if response['status']
|
'subject': ("Deleted " if response['status']
|
||||||
else "ERROR deleting ") + admin_msg_sub,
|
else "ERROR deleting ") + admin_msg_sub,
|
||||||
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
||||||
'to': ['dcl-orders@ungleich.ch'],
|
'to': ['info@ungleich.ch'],
|
||||||
'body': "\n".join(
|
'body': "\n".join(
|
||||||
["%s=%s" % (k, v) for (k, v) in admin_email_body.items()]),
|
["%s=%s" % (k, v) for (k, v) in admin_email_body.items()]),
|
||||||
}
|
}
|
||||||
|
|
21
release.sh
21
release.sh
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# Nico Schottelius, 2021-12-17
|
|
||||||
|
|
||||||
current=$(git describe --dirty)
|
|
||||||
last_tag=$(git describe --tags --abbrev=0)
|
|
||||||
registry=harbor.ungleich.svc.p10.k8s.ooo/ungleich-public
|
|
||||||
image_url=$registry/dynamicweb:${current}
|
|
||||||
|
|
||||||
if echo $current | grep -q -e 'dirty$'; then
|
|
||||||
echo Refusing to release a dirty tree build
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$current" != "$last_tag" ]; then
|
|
||||||
echo "Last tag ($last_tag) is not current version ($current)"
|
|
||||||
echo "Only release proper versions"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker tag dynamicweb:${current} ${image_url}
|
|
||||||
docker push ${image_url}
|
|
|
@ -25,7 +25,7 @@ django-compressor==2.0
|
||||||
django-debug-toolbar==1.4
|
django-debug-toolbar==1.4
|
||||||
python-dotenv==0.10.3
|
python-dotenv==0.10.3
|
||||||
django-extensions==1.6.7
|
django-extensions==1.6.7
|
||||||
django-filer==2.1.2
|
django-filer==1.2.0
|
||||||
django-filter==0.13.0
|
django-filter==0.13.0
|
||||||
django-formtools==1.0
|
django-formtools==1.0
|
||||||
django-guardian==1.4.4
|
django-guardian==1.4.4
|
||||||
|
@ -83,7 +83,7 @@ stripe==2.41.0
|
||||||
wheel==0.29.0
|
wheel==0.29.0
|
||||||
django-admin-honeypot==1.0.0
|
django-admin-honeypot==1.0.0
|
||||||
coverage==4.3.4
|
coverage==4.3.4
|
||||||
git+https://github.com/ungleich/python-oca.git#egg=oca
|
git+https://github.com/ungleich/python-oca.git#egg=python-oca
|
||||||
djangorestframework==3.6.3
|
djangorestframework==3.6.3
|
||||||
flake8==3.3.0
|
flake8==3.3.0
|
||||||
python-memcached==1.58
|
python-memcached==1.58
|
||||||
|
|
18
templates/admin/base_site.html
Normal file
18
templates/admin/base_site.html
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{% extends "admin/base_site.html" %}
|
||||||
|
{% block extrahead %}
|
||||||
|
<style>
|
||||||
|
table {
|
||||||
|
width: 90%;
|
||||||
|
border-spacing: 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
table thead th {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
|
@ -134,6 +134,8 @@
|
||||||
digitalglarus.ch<br/>
|
digitalglarus.ch<br/>
|
||||||
hack4lgarus.ch<br/>
|
hack4lgarus.ch<br/>
|
||||||
ipv6onlyhosting.com<br/>
|
ipv6onlyhosting.com<br/>
|
||||||
|
ipv6onlyhosting.ch<br/>
|
||||||
|
ipv6onlyhosting.net<br/>
|
||||||
django-hosting.ch<br/>
|
django-hosting.ch<br/>
|
||||||
rails-hosting.ch<br/>
|
rails-hosting.ch<br/>
|
||||||
node-hosting.ch<br/>
|
node-hosting.ch<br/>
|
||||||
|
|
|
@ -3,7 +3,6 @@ import hashlib
|
||||||
import random
|
import random
|
||||||
import ldap3
|
import ldap3
|
||||||
import logging
|
import logging
|
||||||
import unicodedata
|
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
@ -102,7 +101,7 @@ class LdapManager:
|
||||||
"uidNumber": [str(uidNumber)],
|
"uidNumber": [str(uidNumber)],
|
||||||
"gidNumber": [str(settings.LDAP_CUSTOMER_GROUP_ID)],
|
"gidNumber": [str(settings.LDAP_CUSTOMER_GROUP_ID)],
|
||||||
"loginShell": ["/bin/bash"],
|
"loginShell": ["/bin/bash"],
|
||||||
"homeDirectory": ["/home/{}".format(unicodedata.normalize('NFKD', user).encode('ascii','ignore'))],
|
"homeDirectory": ["/home/{}".format(user).encode("utf-8")],
|
||||||
"mail": email.encode("utf-8"),
|
"mail": email.encode("utf-8"),
|
||||||
"userPassword": [self._ssha_password(
|
"userPassword": [self._ssha_password(
|
||||||
password.encode("utf-8")
|
password.encode("utf-8")
|
||||||
|
|
Loading…
Add table
Reference in a new issue