diff --git a/digitalglarus/urls.py b/digitalglarus/urls.py index 7f08190c..b25fa273 100644 --- a/digitalglarus/urls.py +++ b/digitalglarus/urls.py @@ -5,6 +5,7 @@ from . import views from .views import ContactView, IndexView, AboutView urlpatterns = [ + url(_(r'^$'), IndexView.as_view(), name='contact'), url(_(r'contact/?$'), ContactView.as_view(), name='contact'), 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'), diff --git a/digitalglarus/views.py b/digitalglarus/views.py index b4623922..edd5dbdf 100644 --- a/digitalglarus/views.py +++ b/digitalglarus/views.py @@ -20,6 +20,7 @@ from membership.models import Calendar as CalendarModel import json from django.contrib.auth import logout + class CalendarApi(View): def get(self,request,month,year): calendar = BookCalendar(request.user,requested_month=month).formatmonth(int(year),int(month)) diff --git a/membership/forms.py b/membership/forms.py index 999add6b..7d2e8850 100644 --- a/membership/forms.py +++ b/membership/forms.py @@ -26,7 +26,7 @@ class LoginForm(forms.Form): def login(self,request): username = self.cleaned_data.get('email') password = self.cleaned_data.get('password') - user = authenticate(email=username,password=password) + user = authenticate(email=username, password=password) return user diff --git a/nosystemd/static/nosystemd/css/nosystemd.css b/nosystemd/static/nosystemd/css/nosystemd.css index abba1659..120508bc 100644 --- a/nosystemd/static/nosystemd/css/nosystemd.css +++ b/nosystemd/static/nosystemd/css/nosystemd.css @@ -1,3 +1,16 @@ +form{ + + + font-family: sans-serif; +} + + +.donation-container { + + margin-top:0% !important; +} + + .donations-container { top:30% !important; diff --git a/nosystemd/static/nosystemd/js/donation.js b/nosystemd/static/nosystemd/js/donation.js index c431f7ce..b853cab7 100644 --- a/nosystemd/static/nosystemd/js/donation.js +++ b/nosystemd/static/nosystemd/js/donation.js @@ -37,7 +37,9 @@ $( document ).ready(function() { var PublishableKey = window.stripeKey; Stripe.setPublishableKey(PublishableKey); + console.log('form',$form); Stripe.card.createToken($form, function stripeResponseHandler(status, response) { + console.log('response',response); if (response.error) { /* Visual feedback */ $form.find('[type=submit]').html('Try again'); diff --git a/nosystemd/templates/nosystemd/donation.html b/nosystemd/templates/nosystemd/donation.html index 864a98e9..0156db4d 100644 --- a/nosystemd/templates/nosystemd/donation.html +++ b/nosystemd/templates/nosystemd/donation.html @@ -4,10 +4,10 @@ <!-- Credit card form --> <header> - <div class="header-content"> - <div class="header-content-inner"> + <div class="header-content donation-container"> + <div class="header-content-inner "> - <div class="container payment-container"> + <div class="container"> <form role="form" id="donation-form" name="donation-form" method="post" action="{% url 'nosystemd:make_donation' %}" novalidate> <div class="row"> <div class="col-xs-12 col-md-4 col-md-offset-3" > @@ -53,9 +53,18 @@ <div class="row"> <div class="col-xs-9 col-md-12"> <div class="form-group"> - <label class="control-label" for="cardNumber">CARD NUMBER</label> <div class="input-group"> - <input type="text" class="form-control" name="cardNumber" placeholder="Valid Card Number" required autofocus data-stripe="number" /> + <input type="text" class="form-control" name="cardName" placeholder="Name on card" required autofocus data-stripe="name" /> + <span class="input-group-addon"><i class="fa fa-credit-card"></i></span> + </div> + </div> + </div> + </div> + <div class="row"> + <div class="col-xs-9 col-md-12"> + <div class="form-group"> + <div class="input-group"> + <input type="text" class="form-control" name="cardNumber" placeholder="Valid Card Number" required data-stripe="number" /> <span class="input-group-addon"><i class="fa fa-credit-card"></i></span> </div> </div> diff --git a/ungleich/templates/ungleich/djangocms_blog/includes/blog_item.html b/ungleich/templates/ungleich/djangocms_blog/includes/blog_item.html index 50c1b0ce..9825fe92 100644 --- a/ungleich/templates/ungleich/djangocms_blog/includes/blog_item.html +++ b/ungleich/templates/ungleich/djangocms_blog/includes/blog_item.html @@ -5,6 +5,7 @@ <h2 class="post-title"> {{ post.title }} </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" %} diff --git a/ungleich/test_views.py b/ungleich/test_views.py index 09375894..17130857 100644 --- a/ungleich/test_views.py +++ b/ungleich/test_views.py @@ -22,6 +22,7 @@ class PostListViewUngleichTest(BaseTestCase): self.url = reverse('ungleich:post-list') self.view = PostListViewUngleich self.expected_template = 'djangocms_blog/post_list_ungleich.html' + activate(self.EN_LANGUAGE_CODE) en_post_titles = ['post-title-1', 'post-title-2'] self.en_posts = [mommy.make(Post, title=x, publish=True) for x in en_post_titles] # activate DE language in order to create DE POSTS