Commits

Frederic De Groef committed 323c5f8

configurable sample qrcode url

Comments (0)

Files changed (3)

 BASE_URL = "http://geholimport.appspot.com"
 COURSE_QRCODE_URL_TEMPLATE = "http://chart.apis.google.com/chart?cht=qr&chl="+BASE_URL+"/course/%s&chs=%dx%d"
 STUDENTSET_QRCODE_URL_TEMPLATE = "http://chart.apis.google.com/chart?cht=qr&chl="+BASE_URL+"/student_set/m/%s&chs=%dx%d"
-                                 
+
+
+
+QRCODE_SAMPLE_URL = "https://twitter.com/oprah/status/1542224596"
 from csvrenderer import CSVRenderer
 from studentsetcalendar import StudentSetSummary, StudentSetIcalRenderer, StudentSetMobileSummary, StudentSetQRCode 
 from savedrequests import PreviousRequest, PreviousStudentSetRequests
+import conf
 
 
 class MainPage(webapp.RequestHandler):
 class QuestionsPage(webapp.RequestHandler):
     def get(self):
         template_values = {'gehol_is_down': is_status_down(),
-                          'last_status_update': get_last_status_update()
+                          'last_status_update': get_last_status_update(),
+                          'qrcode_sample_url': conf.QRCODE_SAMPLE_URL
         }
 
         path = os.path.join(os.path.dirname(__file__), 'templates/questions.html')

templates/questions.html

         </p>
 
         <p style="text-align: center">
-            <a href="http://chart.apis.google.com/chart?cht=qr&chl=http://geholimport.appspot.com/student_set/m/SPLUS35F0C2&chs=512x512">
-                <img src=" http://chart.apis.google.com/chart?cht=qr&chl=http://geholimport.appspot.com/student_set/m/SPLUS35F0C2&chs=256x256" />
+            <a href="http://chart.apis.google.com/chart?cht=qr&chl={{ qrcode_sample_url  }}&chs=512x512">
+                <img src=" http://chart.apis.google.com/chart?cht=qr&chl={{ qrcode_sample_url }}&chs=256x256" />
             </a>
         </p>
         <p> Feels like the future, doesn't it?</p>