Downgrading django from 1.10 to 1.9. Added supports.html. Added supports view . Fixing post supports style. Working on # #2689 Removing links from supportus.html. . Working on # #2689 FIxed history fonts style and color . Working on # #2689 Finished supportus.html. Working on # #2689 Tagging post. Working on # #2689 Fixing broken links history.html. Working on #2674 Deactivate membership. Working on #2686 Reactivate membership

This commit is contained in:
Levi 2016-11-17 21:08:16 -05:00
commit 2a4b6e973d
8 changed files with 131 additions and 65 deletions

View file

@ -91,7 +91,8 @@ class Membership(models.Model):
@classmethod
def activate_or_crete(cls, data, user):
membership = cls.get_by_user(user)
obj, created = cls.objects.update_or_create(id=membership.id, defaults=data)
membership_id = membership.id if membership else None
obj, created = cls.objects.update_or_create(id=membership_id, defaults=data)
return obj
@classmethod

View file

@ -254,7 +254,7 @@ header {
.supporter-black {
padding: 15px 5px 15px;
color: #f5f5f5;
color: #000000;
font-size:18px;
font-weight: 200;
font-family:raleway, monteserrat, open sans, helvitica neue, sans-serif;

View file

@ -102,7 +102,7 @@
<br>
{% endfor %}
<br>
<a href="http://startbootstrap.com/template-overviews/creative/" class="btn btn-default btn-primary sr-button">Become a supporter</a>
<a href="{% url 'digitalglarus:supportus' %}" class="btn btn-default btn-primary sr-button">Become a supporter</a>
<br>
<br>
<br>

View file

@ -1,6 +1,34 @@
{% extends "new_base_glarus.html" %}
{% load staticfiles cms_tags %}
{% block extra_css %}
<style type="text/css">
.supportus-posts .post-preview {
background-color: white;
padding-right: 3%;
}
.supportus-posts img {
margin:6% !important;
}
.supportus-posts p {
/*font-size: 0.5em !important;*/
}
.supportus-posts .post-meta {
font-size: 0.4em !important;
}
.supporter-white {
color: white;
}
</style>
{% endblock %}
{% block content %}
<!-- Header -->
@ -38,9 +66,9 @@
<div class="col-md-4 col-sm-6 portfolio-item text-center wow fadeInDown">
<div class="supportus-box">
<a href="#">
<!-- <a href="#"> -->
<img class="img-responsive img-centered" src="{% static 'digitalglarus/img/supportus/2.png' %}" alt="">
</a>
<!-- </a> -->
<h3 class="donate">Get our news</h3>
@ -57,9 +85,9 @@
</div>
<div class="col-md-4 col-sm-6 text-center wow fadeInDown">
<div class="supportus-box">
<a href="#">
<img class="img-responsive img-centered" src="{% static 'digitalglarus/img/supportus/3.png' %}" alt="">
</a>
<!-- <a href="#"> -->
<img class="img-responsive img-centered image-blog " src="{% static 'digitalglarus/img/supportus/3.png' %}" alt="">
<!-- </a> -->
<h3 class="donate">Connect and Share</h3>
@ -80,9 +108,9 @@
</div>
<div class="col-md-4 col-sm-6 text-center wow fadeInDown">
<div class="supportus-box">
<a href="#">
<!-- <a href="#"> -->
<img class="img-responsive img-centered" src="{% static 'digitalglarus/img/supportus/1.png' %}" alt="">
</a>
<!-- </a> -->
<h3 class="donate">
Donate now
@ -107,20 +135,20 @@
<div class="col-md-12 col-lg-12 text-center wow fadeInDown whatwedowith">
<div class="whatwe-wrap">
<h2 class="whatwedo">What we do with your support</h2>
<p class="carousel-text text-center supporter-black">Discover how your donation is being used in renovating our coworking space!</p>
<p class="carousel-text text-center supporter-white">Discover how your donation is being used in renovating our coworking space!</p>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="col-md-3"></div>
<div class="col-md-6 supportus-posts">
<section class="blog-list">
{% for post in post_list %}
{% include "ungleich/djangocms_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
{% endfor %}
</section>
<a href="https://blog.ungleich.ch/en-us/blog/2016/05/21/renovation-digital-chalet/">
<!-- <a href="https://blog.ungleich.ch/en-us/blog/2016/05/21/renovation-digital-chalet/">
<img class="img-responsive img-centered" src="{% static 'digitalglarus/img/supportus/7.png' %}" alt="">
</a>
</div>
--> </div>
<div class="col-md-2"></div>
</div>

View file

@ -80,6 +80,7 @@
color:white;
}
</style>
{% block extra_css %} {% endblock %}
</head>
@ -112,6 +113,9 @@
<li>
<a class="page-scroll" href="{% url 'digitalglarus:history' %}">history</a>
</li>
<li>
<a class="page-scroll" href="{% url 'digitalglarus:supportus' %}">support us</a>
</li>
<li>
<a class="page-scroll" href="http://blog.ungleich.ch">BLOG</a>
</li>

View file

@ -51,7 +51,7 @@ class SupportusView(TemplateView):
def get_context_data(self, *args, **kwargs):
context = super(SupportusView, self).get_context_data(**kwargs)
tags = ["digitalglarus"]
tags = ["dg-renovation"]
posts = Post.objects.filter(tags__name__in=tags, publish=True).translated(get_language())
context.update({
'post_list': posts