Merge branch 'develop' of github.com:ungleich/dynamicweb into develop
2
.gitignore
vendored
|
@ -11,7 +11,7 @@ __pycache__/
|
||||||
#django
|
#django
|
||||||
local_settings.py
|
local_settings.py
|
||||||
|
|
||||||
media/*
|
media/
|
||||||
!media/keep
|
!media/keep
|
||||||
/CACHE/
|
/CACHE/
|
||||||
/static/
|
/static/
|
||||||
|
|
|
@ -43,6 +43,25 @@ After You have complited the task create a pull request and ask someone to revie
|
||||||
|
|
||||||
`read more about getting code from upstream here <https://help.github.com/articles/syncing-a-fork/>`_
|
`read more about getting code from upstream here <https://help.github.com/articles/syncing-a-fork/>`_
|
||||||
|
|
||||||
|
*merging your branch*
|
||||||
|
(**IMPORTANT**)
|
||||||
|
|
||||||
|
Before You make a pull request from Your forked branch to the ungleich make sure You did merge and resolve any conflicts You may find and that the application is running bug free.
|
||||||
|
Also You can run
|
||||||
|
|
||||||
|
``./manage test``
|
||||||
|
|
||||||
|
|
||||||
|
To merge upstream branch run this git commands.
|
||||||
|
|
||||||
|
``git fetch upstream``
|
||||||
|
|
||||||
|
``git checkout your_feature_branch``
|
||||||
|
|
||||||
|
``git merge remotes/upstream/develop``
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ dotenv.read_dotenv("{0}/.env".format(PROJECT_DIR))
|
||||||
SITE_ID = 1
|
SITE_ID = 1
|
||||||
|
|
||||||
APP_ROOT_ENDPOINT = "/"
|
APP_ROOT_ENDPOINT = "/"
|
||||||
APPEND_SLASH=True
|
APPEND_SLASH = True
|
||||||
|
|
||||||
LOGIN_URL = None
|
LOGIN_URL = None
|
||||||
LOGOUT_URL = None
|
LOGOUT_URL = None
|
||||||
|
@ -43,7 +43,7 @@ SECRET_KEY = env('DJANGO_SECRET_KEY')
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
#1st migrate
|
# 1st migrate
|
||||||
'membership',
|
'membership',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
|
@ -79,26 +79,26 @@ INSTALLED_APPS = (
|
||||||
'menus', # helper for model independent hierarchical website navigation
|
'menus', # helper for model independent hierarchical website navigation
|
||||||
'cmsplugin_filer_image',
|
'cmsplugin_filer_image',
|
||||||
|
|
||||||
#2nd migrate
|
# 2nd migrate
|
||||||
# django-cms plugins
|
# django-cms plugins
|
||||||
'djangocms_file',
|
'djangocms_file',
|
||||||
'djangocms_picture',
|
'djangocms_picture',
|
||||||
'djangocms_video',
|
'djangocms_video',
|
||||||
# 'djangocms_flash',
|
# 'djangocms_flash',
|
||||||
# 'djangocms_googlemap',
|
# 'djangocms_googlemap',
|
||||||
# 'djangocms_inherit',
|
# 'djangocms_inherit',
|
||||||
# 'djangocms_link',
|
# 'djangocms_link',
|
||||||
# 'djangocms_teaser',
|
# 'djangocms_teaser',
|
||||||
'djangocms_page_meta',
|
'djangocms_page_meta',
|
||||||
'djangocms_text_ckeditor',
|
'djangocms_text_ckeditor',
|
||||||
'djangocms_admin_style',
|
'djangocms_admin_style',
|
||||||
'cmsplugin_filer_file',
|
'cmsplugin_filer_file',
|
||||||
'cmsplugin_filer_folder',
|
'cmsplugin_filer_folder',
|
||||||
'cmsplugin_filer_link',
|
'cmsplugin_filer_link',
|
||||||
# 'cmsplugin_filer_teaser',
|
# 'cmsplugin_filer_teaser',
|
||||||
'cmsplugin_filer_video',
|
'cmsplugin_filer_video',
|
||||||
#
|
#
|
||||||
#blog
|
# blog
|
||||||
# versioning
|
# versioning
|
||||||
'reversion',
|
'reversion',
|
||||||
# ungleich
|
# ungleich
|
||||||
|
@ -106,8 +106,7 @@ INSTALLED_APPS = (
|
||||||
'ungleich_page',
|
'ungleich_page',
|
||||||
'hosting',
|
'hosting',
|
||||||
'digitalglarus',
|
'digitalglarus',
|
||||||
'django_extensions',
|
|
||||||
'debug_toolbar'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
MIDDLEWARE_CLASSES = (
|
||||||
|
@ -128,18 +127,17 @@ MIDDLEWARE_CLASSES = (
|
||||||
|
|
||||||
ROOT_URLCONF = 'dynamicweb.urls'
|
ROOT_URLCONF = 'dynamicweb.urls'
|
||||||
|
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
'DIRS': [os.path.join(PROJECT_DIR,'cms_templates/'),
|
'DIRS': [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,'membership'),
|
os.path.join(PROJECT_DIR, 'membership'),
|
||||||
os.path.join(PROJECT_DIR,'ungleich/templates/djangocms_blog/'),
|
os.path.join(PROJECT_DIR, 'ungleich/templates/djangocms_blog/'),
|
||||||
os.path.join(PROJECT_DIR,'ungleich/templates/cms/ungleichch'),
|
os.path.join(PROJECT_DIR, 'ungleich/templates/cms/ungleichch'),
|
||||||
os.path.join(PROJECT_DIR,'ungleich/templates/ungleich')
|
os.path.join(PROJECT_DIR, 'ungleich/templates/ungleich')
|
||||||
|
|
||||||
],
|
],
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
|
@ -170,7 +168,7 @@ CMS_TEMPLATES = (
|
||||||
('letscowork.html', gettext('DG.CoWork')),
|
('letscowork.html', gettext('DG.CoWork')),
|
||||||
# ('detail.html', gettext('DG.Detail')),
|
# ('detail.html', gettext('DG.Detail')),
|
||||||
('one_column.html', gettext('DG.OneColumn')),
|
('one_column.html', gettext('DG.OneColumn')),
|
||||||
#ungleich
|
# ungleich
|
||||||
('blog_ungleich.html', gettext('Blog')),
|
('blog_ungleich.html', gettext('Blog')),
|
||||||
('page.html', gettext('Page')),
|
('page.html', gettext('Page')),
|
||||||
)
|
)
|
||||||
|
@ -205,7 +203,7 @@ LANGUAGE_CODE = 'en-us'
|
||||||
|
|
||||||
LOCALE_PATHS = [
|
LOCALE_PATHS = [
|
||||||
|
|
||||||
os.path.join(PROJECT_DIR,'digitalglarus/locale'),
|
os.path.join(PROJECT_DIR, 'digitalglarus/locale'),
|
||||||
]
|
]
|
||||||
|
|
||||||
CMS_PLACEHOLDER_CONF = {
|
CMS_PLACEHOLDER_CONF = {
|
||||||
|
@ -332,9 +330,9 @@ STATICFILES_FINDERS = (
|
||||||
'compressor.finders.CompressorFinder',
|
'compressor.finders.CompressorFinder',
|
||||||
)
|
)
|
||||||
|
|
||||||
#COMPRESS_PRECOMPILERS = (
|
# COMPRESS_PRECOMPILERS = (
|
||||||
# ('text/less', 'lesscpy {infile}'),
|
# ('text/less', 'lesscpy {infile}'),
|
||||||
#)
|
# )
|
||||||
|
|
||||||
THUMBNAIL_PROCESSORS = (
|
THUMBNAIL_PROCESSORS = (
|
||||||
'easy_thumbnails.processors.colorspace',
|
'easy_thumbnails.processors.colorspace',
|
||||||
|
@ -446,14 +444,15 @@ AUTH_USER_MODEL = 'membership.CustomUser'
|
||||||
|
|
||||||
# PAYMENT
|
# PAYMENT
|
||||||
|
|
||||||
STRIPE_API_PUBLIC_KEY = 'pk_test_QqBZ50Am8KOxaAlOxbcm9Psl' # used in frontend to call from user browser
|
|
||||||
STRIPE_API_PRIVATE_KEY = 'sk_test_dqAmbKAij12QCGfkYZ3poGt2' # used in backend payment
|
|
||||||
STRIPE_DESCRIPTION_ON_PAYMENT = "Payment for ungleich GmbH services"
|
STRIPE_DESCRIPTION_ON_PAYMENT = "Payment for ungleich GmbH services"
|
||||||
|
|
||||||
# EMAIL MESSAGES
|
# EMAIL MESSAGES
|
||||||
REGISTRATION_MESSAGE = {'subject': "Validation mail",
|
REGISTRATION_MESSAGE = {'subject': "Validation mail",
|
||||||
'message': 'Please validate Your account under this link http://localhost:8000/en-us/validate/{}',
|
'message': 'Thank You for registering for account on Digital Glarus.\nPlease verify Your account under following link http://{host}/en-us/digitalglarus/login/validate/{slug}',
|
||||||
'from': 'test@test.com'}
|
}
|
||||||
|
|
||||||
|
STRIPE_API_PRIVATE_KEY = env('STRIPE_API_PRIVATE_KEY')
|
||||||
|
STRIPE_API_PUBLIC_KEY = env('STRIPE_API_PUBLIC_KEY')
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
|
@ -461,5 +460,3 @@ if DEBUG:
|
||||||
from .local import *
|
from .local import *
|
||||||
else:
|
else:
|
||||||
from .prod import *
|
from .prod import *
|
||||||
#dont migrate test
|
|
||||||
# SOUTH_TESTS_MIGRATE = False
|
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
from .base import *
|
from .base import *
|
||||||
|
REGISTRATION_MESSAGE['message'] = REGISTRATION_MESSAGE['message'].format(host='dynamicweb-development.ungleich.ch',slug='{slug}')
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
"*"
|
"*"
|
||||||
]
|
]
|
||||||
|
|
||||||
# DATABASES = {
|
|
||||||
# 'default': {
|
|
||||||
# 'ENGINE': 'django.db.backends.sqlite3',
|
|
||||||
# 'NAME': 'app.db',
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
|
|
||||||
CACHES = {
|
CACHES = {
|
||||||
|
@ -20,3 +14,8 @@ CACHES = {
|
||||||
}
|
}
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES+=("debug_toolbar.middleware.DebugToolbarMiddleware",)
|
MIDDLEWARE_CLASSES+=("debug_toolbar.middleware.DebugToolbarMiddleware",)
|
||||||
|
|
||||||
|
INSTALLED_APPS+=(
|
||||||
|
'django_extensions',
|
||||||
|
'debug_toolbar'
|
||||||
|
)
|
||||||
|
|
|
@ -8,6 +8,8 @@ ADMINS = (
|
||||||
|
|
||||||
MANAGERS = ADMINS
|
MANAGERS = ADMINS
|
||||||
|
|
||||||
|
REGISTRATION_MESSAGE['message'] = REGISTRATION_MESSAGE['message'].format(host='digitalglarus.ungleich.ch',slug='{slug}')
|
||||||
|
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
".ungleich.ch",
|
".ungleich.ch",
|
||||||
"digital.glarus.ungleich.ch" ,
|
"digital.glarus.ungleich.ch" ,
|
||||||
|
|
|
@ -7,6 +7,7 @@ from django.conf.urls.static import static
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from hosting.views import RailsHostingView, DjangoHostingView, NodeJSHostingView
|
from hosting.views import RailsHostingView, DjangoHostingView, NodeJSHostingView
|
||||||
from membership import urls as membership_urls
|
from membership import urls as membership_urls
|
||||||
|
import debug_toolbar
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^hosting/', include('hosting.urls', namespace="hosting")),
|
url(r'^hosting/', include('hosting.urls', namespace="hosting")),
|
||||||
|
@ -28,7 +29,7 @@ urlpatterns += i18n_patterns('',
|
||||||
url(r'^ungleich_page/',
|
url(r'^ungleich_page/',
|
||||||
include('ungleich_page.urls', namespace='ungleich_page'),
|
include('ungleich_page.urls', namespace='ungleich_page'),
|
||||||
name='ungleich_page'),
|
name='ungleich_page'),
|
||||||
url(r'^blog/',include('ungleich.urls',namespace='ungleich')),
|
url(r'^blog/', include('ungleich.urls', namespace='ungleich')),
|
||||||
url(r'^', include('cms.urls'))
|
url(r'^', include('cms.urls'))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -39,3 +40,4 @@ if settings.DEBUG:
|
||||||
'document_root': settings.MEDIA_ROOT,
|
'document_root': settings.MEDIA_ROOT,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
urlpatterns += patterns('',url(r'^__debug__/', include(debug_toolbar.urls)))
|
||||||
|
|
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 338 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 456 B |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 768 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 443 B |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 772 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 799 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.8 KiB |
|
@ -4,12 +4,12 @@ from django.db import models
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.contrib.auth.models import User, AbstractBaseUser, BaseUserManager, AbstractUser
|
from django.contrib.auth.models import User, AbstractBaseUser, BaseUserManager, AbstractUser
|
||||||
from django.contrib.auth.hashers import make_password
|
from django.contrib.auth.hashers import make_password
|
||||||
from django.core.mail import send_mail
|
|
||||||
from django.core.validators import RegexValidator
|
from django.core.validators import RegexValidator
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.contrib.sites.models import Site
|
from django.contrib.sites.models import Site
|
||||||
|
|
||||||
from utils.stripe_utils import StripeUtils
|
from utils.stripe_utils import StripeUtils
|
||||||
|
from utils.mailer import DigitalGlarusRegistrationMailer
|
||||||
|
|
||||||
REGISTRATION_MESSAGE = {'subject': "Validation mail",
|
REGISTRATION_MESSAGE = {'subject': "Validation mail",
|
||||||
'message': 'Please validate Your account under this link http://localhost:8000/en-us/digitalglarus/login/validate/{}',
|
'message': 'Please validate Your account under this link http://localhost:8000/en-us/digitalglarus/login/validate/{}',
|
||||||
|
@ -72,9 +72,8 @@ class CustomUser(AbstractBaseUser):
|
||||||
if not user:
|
if not user:
|
||||||
user = cls.objects.create_user(name=name, email=email, password=password)
|
user = cls.objects.create_user(name=name, email=email, password=password)
|
||||||
if user:
|
if user:
|
||||||
send_mail(REGISTRATION_MESSAGE['subject'],
|
dg = DigitalGlarusRegistrationMailer(user.validation_slug)
|
||||||
REGISTRATION_MESSAGE['message'].format(user.validation_slug),
|
dg.send_mail(to=user.email)
|
||||||
REGISTRATION_MESSAGE['from'], [user.email], fail_silently=False)
|
|
||||||
return user
|
return user
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -1,63 +1,73 @@
|
||||||
{% load static meta cms_tags%}
|
{% load static meta cms_tags %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<section id="contact">
|
<section id="contact">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row" class="wow fadeInDown">
|
<div class="row" class="wow fadeInDown">
|
||||||
<div class="col-lg-12 text-center wow fadeInDown">
|
<div class="col-lg-12 text-center wow fadeInDown">
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
<div class="alert alert-success alert-dismissible" role="alert">
|
<div class="alert alert-success alert-dismissible" role="alert">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close" autofocus><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"
|
||||||
<strong>{{ message }}</strong>
|
autofocus><span aria-hidden="true">×</span></button>
|
||||||
</div>
|
<strong>{{ message }}</strong>
|
||||||
{% endfor %}
|
</div>
|
||||||
<h2 class="section-heading">{% trans "Contact Us" %}</h2>
|
{% endfor %}
|
||||||
<br>
|
<h2 class="section-heading">{% trans "Contact Us" %}</h2>
|
||||||
<h3 class="intro-smallcap">{% trans "Join us at" %} <a href="{% page_url 'digital-glarus-page' %}">{% trans "Digital Glarus" %}</a>,
|
<br>
|
||||||
{% 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>
|
|
||||||
<h3 class="intro-smallcap"><i class="fa fa-phone"></i> (044) 534-66-22<p></p></h3>
|
|
||||||
<h3 class="intro-smallcap">{% trans "or" %}</h3>
|
|
||||||
<h3 class="intro-smallcap">{% trans "Contact Us" %}</h3>
|
|
||||||
|
|
||||||
<form action="{% url 'ungleich_page:contact' %}" method="post" >
|
<h3 class="intro-smallcap">{% trans "Join us at" %} <a
|
||||||
{% csrf_token %}
|
href="{% page_url 'digital-glarus-page' %}">{% trans "Digital Glarus" %}</a>,
|
||||||
<div class="row">
|
{% trans "a great co-working space in the middle of Alps!" %}
|
||||||
<div autofocus class="form-group col-lg-4 {% if form.name.errors %}has-error text-danger{% endif %}">
|
<p></p> {% trans "You can contact us at" %} </h3>
|
||||||
{{ form.name.label_tag }}
|
<h3 class="intro-smallcap"><a href="mailto:info@ungleich.ch"><i class="fa fa-envelope">info@ungleich.ch</i></a>
|
||||||
{{ form.name }}
|
</h3>
|
||||||
{{ form.name.errors|striptags}}
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-lg-4 {% if form.email.errors %}has-error text-danger {% endif %}">
|
|
||||||
{{ form.email.label_tag }}
|
|
||||||
{{ form.email }}
|
|
||||||
{{ form.email.errors|striptags}}
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-lg-4 {% if form.phone_number.errors %}has-error text-danger {% endif %}">
|
|
||||||
{{ form.phone_number.label_tag }}
|
|
||||||
{{ form.phone_number }}
|
|
||||||
{{ form.phone_number.errors|striptags}}
|
|
||||||
</div>
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
<div class="form-group col-lg-12 {% if form.message.errors %}has-error text-danger {% endif %}">
|
|
||||||
{{ form.message.label_tag }}
|
|
||||||
{{ form.message }}
|
|
||||||
{{ form.message.errors|striptags}}
|
|
||||||
</div>
|
|
||||||
{{ form.non_field_errors }}
|
|
||||||
<div class="form-group col-lg-12">
|
|
||||||
<input type="hidden" name="save" value="contact">
|
|
||||||
<button type="submit" class="btn btn-default" {% if form.name.errors %} autofocus {% endif %}>{% trans "Submit" %}</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<p> </p>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-12">
|
|
||||||
|
|
||||||
</div>
|
<h3 class="intro-smallcap"><i class="fa fa-phone"></i> (044) 534-66-22<p></p></h3>
|
||||||
</div>
|
<h3 class="intro-smallcap">{% trans "or" %}</h3>
|
||||||
</div>
|
|
||||||
|
<h3 class="intro-smallcap">{% trans "Contact Us" %}</h3>
|
||||||
|
|
||||||
|
<form action="{% url 'ungleich_page:contact' %}" method="post">
|
||||||
|
|
||||||
|
{% csrf_token %}
|
||||||
|
<div class="row">
|
||||||
|
<div autofocus
|
||||||
|
class="form-group col-lg-4 {% if form.name.errors %}has-error text-danger{% endif %}">
|
||||||
|
{{ form.name.label_tag }}
|
||||||
|
{{ form.name }}
|
||||||
|
{{ form.name.errors|striptags }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-lg-4 {% if form.email.errors %}has-error text-danger {% endif %}">
|
||||||
|
{{ form.email.label_tag }}
|
||||||
|
{{ form.email }}
|
||||||
|
{{ form.email.errors|striptags }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-lg-4 {% if form.phone_number.errors %}has-error text-danger {% endif %}">
|
||||||
|
{{ form.phone_number.label_tag }}
|
||||||
|
{{ form.phone_number }}
|
||||||
|
{{ form.phone_number.errors|striptags }}
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<div class="form-group col-lg-12 {% if form.message.errors %}has-error text-danger {% endif %}">
|
||||||
|
{{ form.message.label_tag }}
|
||||||
|
{{ form.message }}
|
||||||
|
{{ form.message.errors|striptags }}
|
||||||
|
</div>
|
||||||
|
{{ form.non_field_errors }}
|
||||||
|
<div class="form-group col-lg-12">
|
||||||
|
<input type="hidden" name="save" value="contact">
|
||||||
|
<button type="submit" class="btn btn-default" {% if form.name.errors %}
|
||||||
|
autofocus {% endif %}>{% trans "Submit" %}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<p> </p>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
|
@ -6,8 +6,8 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12 text-center wow fadeInDown">
|
<div class="col-lg-12 text-center wow fadeInDown">
|
||||||
<h2 class="section-heading">{% trans "our services" %}</h2>
|
<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.<p></p>
|
<h3 class="section-subheading text-muted">We support our clients in all areas of Unix infrastructure.<p></p>
|
||||||
Our top notch configuration management is refreshingly simple and reliable." %}</h3>
|
Our top notch configuration management is refreshingly simple and reliable."</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row text-center">
|
<div class="row text-center">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
@ -14,12 +14,12 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- Bootstrap Core CSS -->
|
<!-- Bootstrap Core CSS -->
|
||||||
<link href="{% static 'ungleich_page/css/bootstrap.min.css'%}" rel="stylesheet">
|
<link href="{% static 'ungleich_page/css/bootstrap.min.css' %}" rel="stylesheet">
|
||||||
<link href="{% static 'ungleich_page/css/lib/animate.min.css'%}" rel="stylesheet">
|
<link href="{% static 'ungleich_page/css/lib/animate.min.css' %}" rel="stylesheet">
|
||||||
|
|
||||||
|
|
||||||
<!-- Custom CSS -->
|
<!-- Custom CSS -->
|
||||||
<link href="{% static 'ungleich_page/css/agency.css'%}" rel="stylesheet">
|
<link href="{% static 'ungleich_page/css/agency.css' %}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- 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:// -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
|
@ -28,130 +28,147 @@
|
||||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<link href="{% static 'ungleich_page/css/ungleich.css'%}" rel="stylesheet">
|
<link href="{% static 'ungleich_page/css/ungleich.css' %}" rel="stylesheet">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Google tracking -->
|
<!-- Google tracking -->
|
||||||
<script src="//www.google-analytics.com/analytics.js" async></script><script>
|
<script src="//www.google-analytics.com/analytics.js" async></script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
<script>
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
(function (i, s, o, g, r, a, m) {
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
i['GoogleAnalyticsObject'] = r;
|
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
i[r] = i[r] || function () {
|
||||||
|
(i[r].q = i[r].q || []).push(arguments)
|
||||||
|
}, i[r].l = 1 * new Date();
|
||||||
|
a = s.createElement(o),
|
||||||
|
m = s.getElementsByTagName(o)[0];
|
||||||
|
a.async = 1;
|
||||||
|
a.src = g;
|
||||||
|
m.parentNode.insertBefore(a, m)
|
||||||
|
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||||
|
|
||||||
ga('create', 'UA-62285904-1', 'auto');
|
ga('create', 'UA-62285904-1', 'auto');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
|
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
|
||||||
<style id="igtranslator-color" type="text/css"></style></head>
|
<style id="igtranslator-color" type="text/css"></style>
|
||||||
|
</head>
|
||||||
|
|
||||||
<body id="page-top" class="index">
|
<body id="page-top" class="index">
|
||||||
|
|
||||||
<!-- Navigation -->
|
<!-- Navigation -->
|
||||||
<nav class="navbar navbar-default navbar-fixed-top">
|
<nav class="navbar navbar-default navbar-fixed-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- Brand and toggle get grouped for better mobile display -->
|
<!-- Brand and toggle get grouped for better mobile display -->
|
||||||
<div class="navbar-header page-scroll">
|
<div class="navbar-header page-scroll">
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
<button type="button" class="navbar-toggle" data-toggle="collapse"
|
||||||
<span class="sr-only">Toggle navigation</span>
|
data-target="#bs-example-navbar-collapse-1">
|
||||||
<span class="icon-bar"></span>
|
<span class="sr-only">Toggle navigation</span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
<span class="icon-bar"></span>
|
||||||
<p><a class="navbar-brand page-scroll" href="#page-top"><img src="{% static 'ungleich_page/img/logo_white.svg'%}"></a></p>
|
</button>
|
||||||
<p> </p>
|
<p><a class="navbar-brand page-scroll" href="#page-top"><img
|
||||||
</div>
|
src="{% static 'ungleich_page/img/logo_white.svg' %}"></a></p>
|
||||||
|
|
||||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
<p> </p>
|
||||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
</div>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
|
||||||
<li class="hidden active">
|
|
||||||
<a href="#page-top"></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="page-scroll" href="#services">services</a></li>
|
|
||||||
<li></li>
|
|
||||||
<li></li>
|
|
||||||
<li> </li>
|
|
||||||
<li>
|
|
||||||
<a class="page-scroll" href="#portfolio">products</a></li>
|
|
||||||
<li> </li>
|
|
||||||
<li>
|
|
||||||
<a class="page-scroll" href="#about">About</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="page-scroll" href="#team">WHY UNGLEICH?</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="page-scroll" href="http://blog.ungleich.ch">BLOG</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="page-scroll" href="#contact">Contact</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<!-- /.navbar-collapse -->
|
|
||||||
</div>
|
|
||||||
<!-- /.container-fluid -->
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- Header -->
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||||
{% include "ungleich_page/includes/_header.html" %}
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||||
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
<li class="hidden active">
|
||||||
|
<a href="#page-top"></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="#services">services</a></li>
|
||||||
|
<li></li>
|
||||||
|
<li></li>
|
||||||
|
<li></li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="#portfolio">products</a></li>
|
||||||
|
<li></li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="#about">About</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="#team">WHY UNGLEICH?</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="http://blog.ungleich.ch">BLOG</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="#contact">Contact</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- /.navbar-collapse -->
|
||||||
|
</div>
|
||||||
|
<!-- /.container-fluid -->
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
{% include "ungleich_page/includes/_header.html" %}
|
||||||
|
|
||||||
|
|
||||||
<!-- Services Section -->
|
<!-- Services Section -->
|
||||||
{% include "ungleich_page/includes/_services.html" %}
|
{% include "ungleich_page/includes/_services.html" %}
|
||||||
|
|
||||||
<!-- Portfolio Grid Section -->
|
<!-- Portfolio Grid Section -->
|
||||||
{% include "ungleich_page/includes/_portfolio.html" %}
|
{% include "ungleich_page/includes/_portfolio.html" %}
|
||||||
|
|
||||||
|
|
||||||
<!-- About Section -->
|
<!-- About Section -->
|
||||||
{% include "ungleich_page/includes/_about.html" %}$
|
{% include "ungleich_page/includes/_about.html" %}$
|
||||||
|
|
||||||
<!-- Team Section -->
|
<!-- Team Section -->
|
||||||
{% include "ungleich_page/includes/_team.html" %}
|
{% include "ungleich_page/includes/_team.html" %}
|
||||||
|
|
||||||
<!-- Software We Use Section -->
|
<!-- Software We Use Section -->
|
||||||
{% include "ungleich_page/includes/_softwares.html" %}
|
{% include "ungleich_page/includes/_softwares.html" %}
|
||||||
|
|
||||||
<!-- Contact Us Section -->
|
<!-- Contact Us Section -->
|
||||||
{% include "ungleich_page/includes/_contact_us.html" %}
|
{% include "ungleich_page/includes/_contact_us.html" %}
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
{% include "ungleich_page/includes/_footer.html" %}
|
{% include "ungleich_page/includes/_footer.html" %}
|
||||||
|
|
||||||
<!-- Portfolio Modals -->
|
<!-- Portfolio Modals -->
|
||||||
<!-- Use the modals below to showcase details about your portfolio projects! -->
|
<!-- Use the modals below to showcase details about your portfolio projects! -->
|
||||||
|
|
||||||
<!-- Portfolio Modal 1 -->
|
<!-- Portfolio Modal 1 -->
|
||||||
|
|
||||||
<!-- Portfolio Modal 2 -->
|
<!-- Portfolio Modal 2 -->
|
||||||
|
|
||||||
<!-- Portfolio Modal 3 -->
|
<!-- Portfolio Modal 3 -->
|
||||||
|
|
||||||
<!-- Portfolio Modal 4 -->
|
<!-- Portfolio Modal 4 -->
|
||||||
|
|
||||||
<!-- Portfolio Modal 6 -->
|
<!-- Portfolio Modal 6 -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script src="{% static 'ungleich_page/js/jquery.js' %}" type="text/javascript" ></script>
|
<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 -->
|
<!-- Bootstrap Core JavaScript -->
|
||||||
<script src="{% static 'ungleich_page/js/bootstrap.min.js' %}" type="text/javascript" ></script>
|
<script src="{% static 'ungleich_page/js/bootstrap.min.js' %}" type="text/javascript"></script>
|
||||||
|
|
||||||
<!-- Plugin JavaScript -->
|
<!-- Plugin JavaScript -->
|
||||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js" type="text/javascript"></script>
|
<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="{% static 'ungleich_page/js/classie.js' %}" type="text/javascript"></script>
|
||||||
<script src="{% static 'ungleich_page/js/cbpAnimatedHeader.js' %}" type="text/javascript"></script>
|
<script src="{% static 'ungleich_page/js/cbpAnimatedHeader.js' %}" type="text/javascript"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Contact Form JavaScript -->
|
<!-- Contact Form JavaScript -->
|
||||||
<script src="{% static 'ungleich_page/js/jqBootstrapValidation.js' %}" type="text/javascript"></script>
|
<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/contact_me.js' %}" type="text/javascript"></script> -->
|
||||||
|
@ -161,11 +178,13 @@
|
||||||
<script src="{% static 'ungleich_page/js/ungleich.js' %}" type="text/javascript"></script>
|
<script src="{% static 'ungleich_page/js/ungleich.js' %}" type="text/javascript"></script>
|
||||||
|
|
||||||
|
|
||||||
<!-- Custom Fonts -->
|
<!-- Custom Fonts -->
|
||||||
<link href="//fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">
|
<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="{% static 'ungleich_page/font-awesome-4.1.0/css/font-awesome.min.css' %}" rel="stylesheet"
|
||||||
<link href="//fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
type="text/css">
|
||||||
<link href="//fonts.googleapis.com/css?family=Kaushan+Script" 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=Droid+Serif:400,700,400italic,700italic" 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=Roboto+Slab:400,100,300,700" 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">
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,9 +2,10 @@ from django.contrib import messages
|
||||||
|
|
||||||
from django.views.generic.edit import FormView
|
from django.views.generic.edit import FormView
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.core.urlresolvers import reverse_lazy
|
from django.core.urlresolvers import reverse_lazy,reverse
|
||||||
from django.views.generic import View
|
from django.views.generic import View
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render,redirect,render_to_response
|
||||||
|
from django.http import HttpResponseRedirect
|
||||||
|
|
||||||
from utils.forms import ContactUsForm
|
from utils.forms import ContactUsForm
|
||||||
|
|
||||||
|
|
52
utils/mailer.py
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
import six
|
||||||
|
from django.core.mail import send_mail
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
|
class BaseMailer(object):
|
||||||
|
def __init__(self):
|
||||||
|
self._slug = None
|
||||||
|
self.no_replay_mail = 'no-replay@ungleich.ch'
|
||||||
|
|
||||||
|
if not hasattr(self, '_to'):
|
||||||
|
self._to = None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def slug(self):
|
||||||
|
return self._slug
|
||||||
|
|
||||||
|
@slug.setter
|
||||||
|
def slug(self, val):
|
||||||
|
assert isinstance(val, six.string_types), "slug is not string: %r" % val
|
||||||
|
self._slug = val
|
||||||
|
|
||||||
|
@property
|
||||||
|
def registration(self):
|
||||||
|
return self.message
|
||||||
|
|
||||||
|
@registration.setter
|
||||||
|
def registration(self, val):
|
||||||
|
msg = "registration is not dict with fields subject,message"
|
||||||
|
assert type(val) is dict, msg
|
||||||
|
assert val.get('subject') and val.get('message'), msg
|
||||||
|
self._message, self._subject, self._from = (
|
||||||
|
val.get('message'), val.get('subject'), val.get('from'))
|
||||||
|
assert isinstance(self.slug, six.string_types), 'slug not set'
|
||||||
|
|
||||||
|
def send_mail(self, to=None):
|
||||||
|
if not to:
|
||||||
|
to = self._to
|
||||||
|
if not self.message:
|
||||||
|
raise NotImplementedError
|
||||||
|
send_mail(self._subject, self._message, self.no_replay_mail, [to])
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalGlarusRegistrationMailer(BaseMailer):
|
||||||
|
message = settings.REGISTRATION_MESSAGE
|
||||||
|
|
||||||
|
def __init__(self, slug):
|
||||||
|
self.slug = slug
|
||||||
|
self.registration = self.message
|
||||||
|
self._message = self._message.format(slug=self._slug)
|
||||||
|
super().__init__()
|
|
@ -1,6 +1,5 @@
|
||||||
import stripe
|
import stripe
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
stripe.api_key = settings.STRIPE_API_PRIVATE_KEY
|
stripe.api_key = settings.STRIPE_API_PRIVATE_KEY
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,3 +121,6 @@ class StripeUtils(object):
|
||||||
name=name,
|
name=name,
|
||||||
currency=self.CURRENCY,
|
currency=self.CURRENCY,
|
||||||
id=id)
|
id=id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|