Configured django-filer plugin. Added thumbnail of 630x200 to each post in post list view. Now when the user click on digitalglarus on contact form in ungleich landing page, he is redirected to digitalglarus home.Started to change index digitalglarus styleChanged ungleich css. Fixed image thumbnail on post item list . Added email template after an user has been charge for his monthly donation. Fixed command to make donations charge, if there is any error with one donator, it skip him and go on to the next.Added new header to digitalglarus page. Added menu to new digitalglarus landing
This commit is contained in:
parent
5fce858923
commit
fe52e61668
7 changed files with 314 additions and 32 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
{% load staticfiles cms_tags menu_tags sekizai_tags menu_tags %}
|
{% load staticfiles cms_tags menu_tags sekizai_tags menu_tags %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base_glarus.html" %}
|
{% extends "new_base_glarus.html" %}
|
||||||
{% load staticfiles cms_tags %}
|
{% load staticfiles cms_tags %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
245
digitalglarus/templates/new_base_glarus.html
Normal file
245
digitalglarus/templates/new_base_glarus.html
Normal file
|
@ -0,0 +1,245 @@
|
||||||
|
{% load static %}
|
||||||
|
{% load bootstrap3 %}
|
||||||
|
{% load staticfiles cms_tags menu_tags sekizai_tags menu_tags %}
|
||||||
|
{% load i18n %}
|
||||||
|
<!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>Digital Glarus - {% block title %}Welcome{% endblock %}</title>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Bootstrap Core CSS -->
|
||||||
|
<link href="{% static 'ungleich_page/css/bootstrap.min.css' %}" rel="stylesheet">
|
||||||
|
<link href="{% static 'ungleich_page/css/lib/animate.min.css' %}" rel="stylesheet">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Custom CSS -->
|
||||||
|
<link href="{% static 'ungleich_page/css/agency.css' %}" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- 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]-->
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"
|
||||||
|
rel="stylesheet" type="text/css">
|
||||||
|
<link href="//fonts.googleapis.com/css?family=Josefin+Slab:100,300,400,600,700,100italic,300italic,400italic,600italic,700italic"
|
||||||
|
rel="stylesheet" type="text/css">
|
||||||
|
<link href="{% static 'digitalglarus/bower_components/font-awesome/css/font-awesome.min.css' %}"
|
||||||
|
rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
<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 tracking -->
|
||||||
|
<script src="//www.google-analytics.com/analytics.js" async></script>
|
||||||
|
<script>
|
||||||
|
(function (i, s, o, g, r, a, m) {
|
||||||
|
i['GoogleAnalyticsObject'] = r;
|
||||||
|
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('send', 'pageview');
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
|
||||||
|
<style id="igtranslator-color" type="text/css"></style>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
.intro-cap{
|
||||||
|
|
||||||
|
font-size:3em;
|
||||||
|
}
|
||||||
|
.intro-text a{
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body id="page-top" class="index">
|
||||||
|
{% cms_toolbar %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Navigation -->
|
||||||
|
<nav class="navbar navbar-default navbar-fixed-top">
|
||||||
|
<div class="container">
|
||||||
|
<!-- Brand and toggle get grouped for better mobile display -->
|
||||||
|
<div class="navbar-header page-scroll">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse"
|
||||||
|
data-target="#bs-example-navbar-collapse-1">
|
||||||
|
<span class="sr-only">Toggle navigation</span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<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> </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||||
|
<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">{% trans "About"%}</a></li>
|
||||||
|
<li></li>
|
||||||
|
<li></li>
|
||||||
|
<li></li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="#portfolio">{% trans "Contact"%}</a></li>
|
||||||
|
<li></li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="#about">{% trans "Crowdfunding"%}</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="#team">{% trans "Supporters"%}</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="page-scroll" href="http://blog.ungleich.ch">{% trans "BLOG"%}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- /.navbar-collapse -->
|
||||||
|
</div>
|
||||||
|
<!-- /.container-fluid -->
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<header style="background-image: url({% static 'digitalglarus/img/slide-1.jpg' %});box-shadow: inset 0 0 0 1000px rgba(0,0,0,.4);">
|
||||||
|
<div class="container">
|
||||||
|
<div class="intro-text">
|
||||||
|
<p></p><p></p><br>
|
||||||
|
<small>WELCOME TO</small>
|
||||||
|
<br>
|
||||||
|
<span class="intro-cap" style="font-size:3em;">
|
||||||
|
Digital Glarus
|
||||||
|
</span>
|
||||||
|
<hr class="tagline-divider">
|
||||||
|
<small>By
|
||||||
|
<strong><a href="http://ungleich.ch">ungleich gmbh</a></strong>
|
||||||
|
</small>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
{% include "ungleich_page/includes/_header.html" %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Services Section -->
|
||||||
|
{% include "ungleich_page/includes/_services.html" %}
|
||||||
|
|
||||||
|
<!-- Portfolio Grid Section -->
|
||||||
|
{% include "ungleich_page/includes/_portfolio.html" %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- About Section -->
|
||||||
|
{% include "ungleich_page/includes/_about.html" %}$
|
||||||
|
|
||||||
|
<!-- Team Section -->
|
||||||
|
{% include "ungleich_page/includes/_team.html" %}
|
||||||
|
|
||||||
|
<!-- Software We Use Section -->
|
||||||
|
{% include "ungleich_page/includes/_softwares.html" %}
|
||||||
|
|
||||||
|
<!-- Contact Us Section -->
|
||||||
|
{% include "ungleich_page/includes/_contact_us.html" %}
|
||||||
|
|
||||||
|
<!-- 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 -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 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="{% static 'ungleich_page/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="{% static 'ungleich_page/js/cbpAnimatedHeader.js' %}" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<!-- Bootstrap Core JavaScript -->
|
||||||
|
<script src="{% static 'digitalglarus/js/bootstrap.min.js' %}"></script>
|
||||||
|
<script src="{% static 'digitalglarus/js/digital.glarus.js' %}"></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>
|
||||||
|
|
||||||
|
<!-- 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">
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ from . import views
|
||||||
from .views import ContactView, IndexView, AboutView
|
from .views import ContactView, IndexView, AboutView
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(_(r'^$'), IndexView.as_view(), name='contact'),
|
url(_(r'^$'), IndexView.as_view(), name='landing'),
|
||||||
url(_(r'contact/?$'), ContactView.as_view(), name='contact'),
|
url(_(r'contact/?$'), ContactView.as_view(), name='contact'),
|
||||||
url(_(r'supporters/?$'), views.supporters, name='supporters'),
|
url(_(r'supporters/?$'), views.supporters, name='supporters'),
|
||||||
url(r'calendar_api/(?P<month>\d+)/(?P<year>\d+)?$', views.CalendarApi.as_view(),name='calendar_api_1'),
|
url(r'calendar_api/(?P<month>\d+)/(?P<year>\d+)?$', views.CalendarApi.as_view(),name='calendar_api_1'),
|
||||||
|
|
|
@ -4,10 +4,12 @@ from datetime import datetime
|
||||||
|
|
||||||
from utils.stripe_utils import StripeUtils
|
from utils.stripe_utils import StripeUtils
|
||||||
|
|
||||||
|
from utils.mailer import BaseEmail
|
||||||
from nosystemd.models import DonatorStatus, Donation
|
from nosystemd.models import DonatorStatus, Donation
|
||||||
from nosystemd.forms import DonationForm
|
from nosystemd.forms import DonationForm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
help = 'Make the monthly stripe charge to all donators'
|
help = 'Make the monthly stripe charge to all donators'
|
||||||
CURRENCY = 'usd'
|
CURRENCY = 'usd'
|
||||||
|
@ -48,6 +50,7 @@ class Command(BaseCommand):
|
||||||
print("--------- STRIPE PAYMENT ERROR ---------")
|
print("--------- STRIPE PAYMENT ERROR ---------")
|
||||||
print(context)
|
print(context)
|
||||||
print("-------------------------")
|
print("-------------------------")
|
||||||
|
continue
|
||||||
# Create a donation
|
# Create a donation
|
||||||
charge = charge_response.get('response_object')
|
charge = charge_response.get('response_object')
|
||||||
donation_data = {
|
donation_data = {
|
||||||
|
@ -61,6 +64,22 @@ class Command(BaseCommand):
|
||||||
donation_form = DonationForm(donation_data)
|
donation_form = DonationForm(donation_data)
|
||||||
if donation_form.is_valid():
|
if donation_form.is_valid():
|
||||||
donation = donation_form.save()
|
donation = donation_form.save()
|
||||||
|
|
||||||
|
context = {
|
||||||
|
'donation': donation,
|
||||||
|
'base_url': "{0}://{1}".format('https', 'dynamicweb.ungleich.ch')
|
||||||
|
|
||||||
|
}
|
||||||
|
email_data = {
|
||||||
|
'subject': 'Your donation have been charged',
|
||||||
|
'to': donation.donator.user.email,
|
||||||
|
'context': context,
|
||||||
|
'template_name': 'donation_charge',
|
||||||
|
'template_path': 'nosystemd/emails/'
|
||||||
|
}
|
||||||
|
email = BaseEmail(**email_data)
|
||||||
|
email.send()
|
||||||
|
|
||||||
print("--------- PAYMENT DONATION SUCCESSFULL ---------")
|
print("--------- PAYMENT DONATION SUCCESSFULL ---------")
|
||||||
print("Donator: %s" % donation.donator.user.email)
|
print("Donator: %s" % donation.donator.user.email)
|
||||||
print("Amount: %s %s" % (donation.donation, self.CURRENCY))
|
print("Amount: %s %s" % (donation.donation, self.CURRENCY))
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
{% load i18n thumbnail cms_tags %}
|
{% load i18n thumbnail cms_tags %}
|
||||||
|
|
||||||
<div class="post-preview">
|
<div class="post-preview">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
|
||||||
|
<img style="margin-top:11%"src="{% thumbnail post.main_image 240x235 crop upscale subject_location=post.main_image.subject_location %}"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
<a href=" {{ post.get_absolute_url }} ">
|
<a href=" {{ post.get_absolute_url }} ">
|
||||||
<h2 class="post-title">
|
<h2 class="post-title">
|
||||||
{{ post.title }}
|
{{ post.title }}
|
||||||
</h2>
|
</h2>
|
||||||
<img src="{% thumbnail post.main_image 630x200 crop upscale subject_location=post.main_image.subject_location %}"/>
|
|
||||||
<h3 class="post-subtitle">
|
|
||||||
{% if not TRUNCWORDS_COUNT %}
|
|
||||||
{% render_model post "abstract" %}
|
|
||||||
{% else %}
|
|
||||||
{% render_model post "abstract" "" "" 'truncatewords_html:TRUNCWORDS_COUNT' %}
|
|
||||||
{% endif %}
|
|
||||||
</h3>
|
|
||||||
</a>
|
</a>
|
||||||
<p class="post-meta">
|
<p class="post-meta" style="font-size:0.9em;">
|
||||||
Posted
|
Posted
|
||||||
{% if post.author %}
|
{% if post.author %}
|
||||||
by
|
by
|
||||||
|
@ -28,5 +29,20 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
on {{ post.date_published|date:"DATE_FORMAT" }}
|
on {{ post.date_published|date:"DATE_FORMAT" }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p class="post-subtitle">
|
||||||
|
{% if not TRUNCWORDS_COUNT %}
|
||||||
|
{% render_model post "abstract" %}
|
||||||
|
{% else %}
|
||||||
|
{% render_model post "abstract" "" "" 'truncatewords_html:TRUNCWORDS_COUNT' %}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h3 class="intro-smallcap">{% trans "Join us at" %} <a
|
<h3 class="intro-smallcap">{% trans "Join us at" %} <a
|
||||||
href="{% page_url 'digital-glarus-page' %}">{% trans "Digital Glarus" %}</a>,
|
href="{% url 'digitalglarus:landing' %}">{% trans "Digital Glarus" %}</a>,
|
||||||
{% trans "a great co-working space in the middle of Alps!" %}
|
{% trans "a great co-working space in the middle of Alps!" %}
|
||||||
<p></p> {% trans "You can contact us at" %} </h3>
|
<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"><a href="mailto:info@ungleich.ch"><i class="fa fa-envelope">info@ungleich.ch</i></a>
|
||||||
|
|
Loading…
Reference in a new issue