Browse Source

invitations for BarCamp and GeneralAssembly 2015

Christoph Scheid 4 years ago
parent
commit
6d6f899f7b

+ 28
- 0
alembic/versions/2a6d1059c519_new_db_fields_for_GV_and_BC_2015.py View File

@@ -0,0 +1,28 @@
1
+"""new DB fields for GV and BC 2015
2
+
3
+Revision ID: 2a6d1059c519
4
+Revises: 1a6cbb61c557
5
+Create Date: 2015-04-23 22:40:45.466937
6
+
7
+"""
8
+
9
+# revision identifiers, used by Alembic.
10
+revision = '2a6d1059c519'
11
+down_revision = '1a6cbb61c557'
12
+
13
+from alembic import op
14
+import sqlalchemy as sa
15
+
16
+
17
+def upgrade():
18
+    ### commands auto generated by Alembic - please adjust! ###
19
+    op.add_column('members', sa.Column('email_invite_date_bcgv15', sa.DateTime(), nullable=True))
20
+    op.add_column('members', sa.Column('email_invite_flag_bcgv15', sa.Boolean(), nullable=True))
21
+    ### end Alembic commands ###
22
+
23
+
24
+def downgrade():
25
+    ### commands auto generated by Alembic - please adjust! ###
26
+    op.drop_column('members', 'email_invite_flag_bcgv15')
27
+    op.drop_column('members', 'email_invite_date_bcgv15')
28
+    ### end Alembic commands ###

+ 16
- 8
c3smembership/invite_members.py View File

@@ -340,7 +340,7 @@ Auf der verlinkten Seite kannst Du separat die Teilnahme für die
340 340
 Generalversammlung und das Barcamp bestätigen. Auch Essen und
341 341
 (natürlich) ein T-Shirt mit neuem Motiv für die tollen C3S-Tage am Rhein
342 342
 kannst Du Dir holen - die T-Shirt-Preise haben wir für die
343
-Veranstaltungen übrigens heruntergesetzt. 
343
+Veranstaltungen übrigens heruntergesetzt.
344 344
 
345 345
 Wenn Du sicher sein möchtest, von Deiner Teilnahme an Barcamp oder
346 346
 Generalversammlung ein T-Shirt mit nach Hause zu nehmen, solltest Du es
@@ -649,7 +649,7 @@ On the linked page you can confirm your participation in the general
649 649
 assembly and the barcamp separately. You can also book food, and (of
650 650
 course) a t-shirt with a new image for the great days with the C3S on
651 651
 the banks of the river Rhine -- we have reduced our t-shirt prices for
652
-these events. 
652
+these events.
653 653
 
654 654
 If you want to be sure to take a t-shirt home from either the BarCamp or
655 655
 the general assembly, save the date for pre-order: 11th August, 2014.
@@ -720,13 +720,21 @@ Links:
720 720
             'Reply-To': 'yes@c3s.cc',
721 721
             }
722 722
     )
723
-    #print(message.subject)
724
-    #print(message.body)
725
-    mailer = get_mailer(request)
726
-    mailer.send(message)
723
+
724
+    if 'true' in request.registry.settings['testing.mail_to_console']:
725
+        # ^^ yes, a little ugly, but works; it's a string
726
+        #print "printing mail"
727
+        #print(message.subject)
728
+        #print(message.body)
729
+        print(message.body.encode('utf-8'))
730
+    else:
731
+        #print "sending mail"
732
+        mailer = get_mailer(request)
733
+        mailer.send(message)
734
+
727 735
     #_m._token = _looong_token
728
-    _m.email_invite_flag_bcgv14 = True
729
-    _m.email_invite_date_bcgv14 = datetime.now()
736
+    _m.email_invite_flag_bcgv15 = True
737
+    _m.email_invite_date_bcgv15 = datetime.now()
730 738
     return HTTPFound(request.route_url('dashboard',
731 739
                                        number=request.cookies['on_page'],
732 740
                                        order=request.cookies['order'],

+ 2
- 0
c3smembership/models.py View File

@@ -314,6 +314,8 @@ class C3sMember(Base):
314 314
     # invitations
315 315
     email_invite_flag_bcgv14 = Column(Boolean, default=False)
316 316
     email_invite_date_bcgv14 = Column(DateTime(), default=datetime(1970, 1, 1))
317
+    email_invite_flag_bcgv15 = Column(Boolean, default=False)
318
+    email_invite_date_bcgv15 = Column(DateTime(), default=datetime(1970, 1, 1))
317 319
     # legal entities
318 320
     is_legalentity = Column(Boolean, default=False)
319 321
     court_of_law = Column(Unicode(255))

+ 7
- 7
c3smembership/templates/dashboard.pt View File

@@ -105,11 +105,11 @@
105 105
              title="sort by id: descending"
106 106
              class="glyphicon glyphicon-chevron-down"></a>
107 107
         </th>
108
-        <!-- Deactivated for task1291. Left inside for next GV.
108
+        <!-- Reactivated for for next GV. -->
109 109
         <th>
110 110
           BC/GV
111 111
         </th>
112
-        -->
112
+        <!-- -->
113 113
         <th>
114 114
           mtype<br />
115 115
           status
@@ -154,18 +154,18 @@
154 154
           <div tal:condition="member.is_duplicate">
155 155
             <a href="${request.route_url('detail', memberid=member.is_duplicate_of)}">dup:${member.is_duplicate_of}</div>
156 156
         </td>
157
-        <!-- Deactivated for task1291. Left inside for next GV.
157
+        <!-- Reactivated for next GV. -->
158 158
         <td>
159
-          <a tal:condition="not member.email_invite_flag_bcgv14"
159
+          <a tal:condition="not member.email_invite_flag_bcgv15"
160 160
              href="${request.route_url('invite_member', m_id=member.id)}"
161 161
              title="BC/GV invitation not sent yet"
162 162
              class="btn btn-danger"></a>
163
-          <a tal:condition="member.email_invite_flag_bcgv14"
163
+          <a tal:condition="member.email_invite_flag_bcgv15"
164 164
              href="${request.route_url('invite_member', m_id=member.id)}"
165
-             title="gesendet ${member.email_invite_date_bcgv14.strftime('am %d.%m.%Y um %H:%M')}"
165
+             title="gesendet ${member.email_invite_date_bcgv15.strftime('am %d.%m.%Y um %H:%M')}"
166 166
              class="btn btn-success"></a>
167 167
         </td>
168
-        -->
168
+        <!-- -->
169 169
         <td>
170 170
           <a tal:condition="(member.membership_type == 'startnext') or
171 171
                             (member.membership_type == 'unknown') or

+ 3
- 0
development.ini View File

@@ -27,6 +27,9 @@ startnext_importfile = /the/path/to/c3sMembership/import/test_startnext.csv
27 27
 founders_importfile = /path/to/c3sMembership/import/test_founders.csv
28 28
 api_auth_token = 1234567890ABCDEFGHIJKL
29 29
 ticketing.url = http://0.0.0.0:6544
30
+
31
+testing.mail_to_console = true
32
+
30 33
 [server:main]
31 34
 use = egg:waitress#main
32 35
 #Paste#http

+ 2
- 0
production.ini View File

@@ -26,6 +26,8 @@ available_languages = da de en es fr
26 26
 startnext_importfile = /the/path/to/c3sMembership/import/test_startnext.csv
27 27
 founders_importfile = /the/path/to/c3sMembership/import/test_founders.csv
28 28
 
29
+testing.mail_to_console = false
30
+
29 31
 [server:main]
30 32
 use = egg:waitress#main
31 33
 host = 0.0.0.0

Loading…
Cancel
Save