changeset 1171:c855a88f9d78

Merge mainline into V3 dev branch
author Brian Neal <bgneal@gmail.com>
date Sun, 07 Jan 2018 12:00:24 -0600
parents 41f530c80517 (current diff) b213e4b333bb (diff)
children
files
diffstat 5 files changed, 25 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/forums/latest.py	Sun Aug 27 17:05:08 2017 -0500
+++ b/forums/latest.py	Sun Jan 07 12:00:24 2018 -0600
@@ -55,8 +55,10 @@
 import logging
 import time
 
+from django.conf import settings
 from django.dispatch import receiver
 from django.template.loader import render_to_string
+import pytz
 import redis
 
 from forums.signals import post_content_update, topic_content_update
@@ -72,6 +74,8 @@
 # This controls how many updated topics we track
 MAX_UPDATED_TOPICS = 50
 
+SERVER_TZ = pytz.timezone(settings.TIME_ZONE)
+
 # Redis key names:
 POST_COUNT_KEY = "forums:public_post_count"
 TOPIC_COUNT_KEY = "forums:public_topic_count"
@@ -292,7 +296,9 @@
         post = json.loads(raw_post)
 
         # fix up the pubdate; turn it back into a datetime object
-        post['pubdate'] = datetime.datetime.fromtimestamp(post['pubdate'])
+        pubdate = datetime.datetime.utcfromtimestamp(post['pubdate'])
+        pubdate.replace(tzinfo=SERVER_TZ)
+        post['pubdate'] = pubdate
 
         posts.append(post)
 
@@ -474,7 +480,7 @@
         'title': post.topic.name,
         'content': content,
         'author': post.user.username,
-        'pubdate': int(time.mktime(post.creation_date.timetuple())),
+        'pubdate': int(time.mktime(post.creation_date.utctimetuple())),
         'forum_name': post.topic.forum.name,
         'url': post.get_absolute_url()
     }
--- a/sg101/templates/base.html	Sun Aug 27 17:05:08 2017 -0500
+++ b/sg101/templates/base.html	Sun Jan 07 12:00:24 2018 -0600
@@ -94,8 +94,8 @@
 
 <div id="content-primary" class="span-19 last">
    <div>
-      <img src="{% static "images/2006-2017.jpg" %}" alt="SG101 2006-2017"
-         title="SG101 2006-2017"/>
+      <img src="{% static "images/sg101-celebrating.jpg" %}" alt="SG101 Banner"
+         title="SG101 Celebrating Surf Music"/>
    </div>
    {% cache 3600 countdown_v2 %}
       {% countdown_events %}
@@ -116,7 +116,7 @@
       <img src="{% static "logos/nesma.png" %}" alt="NESMA" title="N.E.S.M.A."></a></li>
    <li><a href="http://hangninesurfmusic.blogspot.de/">
       <img src="{% static "logos/hangnine.png" %}" alt="HangNine" title="HangNine Blog"></a></li>
-   <li><a href="http://www.northseasurfradio.com">
+   <li><a href="http://www.northseasurfradio.org">
       <img src="{% static "logos/northsea.png" %}" alt="NSSR" title="North Sea Surf Radio"></a></li>
    <li><a href="http://www.luxuriamusic.com/podcasts/Fiberglass%20Jungle">
       <img src="{% static "logos/fiberglass.png" %}" alt="Fiberglass Jungle" title="Fiberglass Jungle"></a></li>
@@ -158,7 +158,7 @@
    <a href="/colophon/">Colophon</a>
    </p>
    <p>
-   SurfGuitar101.com &copy; 2004 - 2017 by Brian Neal.
+   SurfGuitar101.com &copy; 2004 - 2018 by Brian Neal.
    All comments and user contributed articles are property of the posters.
    </p>
    <p>Thanks to all the surf bands, past and present. And thanks to all the fans who care about and keep surf
--- a/sg101/templates/donations/index.html	Sun Aug 27 17:05:08 2017 -0500
+++ b/sg101/templates/donations/index.html	Sun Jan 07 12:00:24 2018 -0600
@@ -23,24 +23,11 @@
       <form action="{{ form_action }}" method="post">
       <fieldset class="fieldset">
          <legend>Donation Form</legend>
-         <p>Please select an amount:</p>
-         <ul class="no-bullet">
-            <li><input name="amount" type="radio" value="5.00" id="amount_5" />
-               <label for="amount_5">$5</label></li>
-            <li><input name="amount" type="radio" value="10.00" id="amount_10" />
-               <label for="amount_10">$10</label></li>
-            <li><input name="amount" type="radio" value="15.00" id="amount_15" />
-               <label for="amount_15">$15</label></li>
-            <li><input name="amount" type="radio" value="20.00" id="amount_20" />
-               <label for="amount_20">$20</label></li>
-            <li><input name="amount" type="radio" value="" id="amount_other_r" />
-               <label for="amount_other">Other:</label>
-               <div class="input-group">
-                  <span class="input-group-label">$</span>
-                  <input class="input-group-field" name="amount" type="number" value="25.00" id="amount_other" />
-               </div>
-            </li>
-         </ul>
+         <p>Please enter an amount:</p>
+         <div class="input-group">
+            <span class="input-group-label">$</span>
+            <input class="input-group-field" name="amount" type="number" value="5.00"/>
+         </div>
          {% if user.is_authenticated %}
             <input type="hidden" name="custom" value="{{ user.username }}" />
             <p>You are currently logged in. Would you like your site username listed with your donation?</p>
@@ -48,7 +35,8 @@
                <li><input name="item_number" type="radio" value="{{ item_number }}" id="name_yes" />
                <label for="name_yes">Yes, list me as {{ user.username }}</label></li>
          {% else %}
-         <p>You are not currently logged in. Please <a href="{% url 'accounts-login' %}">log in</a>
+         <p>You are not currently logged in.
+         Please <a href="{% url 'accounts-login' %}?next={% url 'donations-index' %}">log in</a>
          if you would like your site username listed with your donation. Otherwise you can have your
          actual name (from Paypal) listed, or you can be listed as {{ anonymous }}.</p>
             <ul class="no-bullet">
--- a/sg101/templates/v3/base.html	Sun Aug 27 17:05:08 2017 -0500
+++ b/sg101/templates/v3/base.html	Sun Jan 07 12:00:24 2018 -0600
@@ -70,8 +70,8 @@
       <a href="/"><img src="{% static "images/v3-logo.png" %}" alt="SG101 logo"></a>
    </div>
    <div class="small-8 columns">
-      <img src="{% static "images/2006-2017.jpg" %}" alt="SG101 2006-2017"
-         title="SG101 2006-2017"/>
+      <img src="{% static "images/sg101-celebrating.jpg" %}" alt="SG101 Banner"
+         title="SG101 Celebrating Surf Music"/>
    </div>
 </div>
 <div class="row show-for-medium">
@@ -97,8 +97,8 @@
     <li class="orbit-slide">
       <div class="row align-center hide-for-medium">
          <div class="small-12 columns">
-            <img src="{% static "images/2006-2017.jpg" %}" alt="SG101 2006-2017"
-               title="SG101 2006-2017"/>
+            <img src="{% static "images/sg101-celebrating.jpg" %}" alt="SG101 Banner"
+               title="SG101 Celebrating Surf Music"/>
          </div>
       </div>
     </li>
@@ -223,7 +223,7 @@
             <img src="{% static "logos/nesma.png" %}" alt="NESMA" title="N.E.S.M.A."></a></li>
          <li><a href="http://hangninesurfmusic.blogspot.de/">
             <img src="{% static "logos/hangnine.png" %}" alt="HangNine" title="HangNine Blog"></a></li>
-         <li><a href="http://www.northseasurfradio.com">
+         <li><a href="http://www.northseasurfradio.org">
             <img src="{% static "logos/northsea.png" %}" alt="NSSR" title="North Sea Surf Radio"></a></li>
          <li><a href="http://www.luxuriamusic.com/podcasts/Fiberglass%20Jungle">
             <img src="{% static "logos/fiberglass.png" %}" alt="Fiberglass Jungle" title="Fiberglass Jungle"></a></li>
@@ -279,7 +279,7 @@
    </div>
    <div class="columns">
       <p>
-         SurfGuitar101.com © 2004 - 2017 by Brian Neal. All comments and user
+         SurfGuitar101.com © 2004 - 2018 by Brian Neal. All comments and user
          contributed articles are property of the posters.
       </p>
       <p>
Binary file static/images/sg101-celebrating.jpg has changed