IRC Logs for #circuits Sunday, 2017-10-22

*** qwebirc61007 has joined #circuits03:22
qwebirc61007Hi, I've been trying to find an answer to this online but can't for the love of my life find it. I'm writing a simple rest api using circuits.web and I have a client calling it as JSONP call. In my server/rest api I want to set the content-type to "application/javascript" but I just can't seem to find out how. Any pointers and tips would be greatly appreciated.03:26
qwebirc61007This is the JSONController I have:03:26
qwebirc61007class Data(JSONController):     channel = "/data"      def counter(self, **kwargs):         ddb = donorsdb()         amount = ddb.getSumOfDonationsFromDate(date(START_YEAR, START_MONTH, START_DAY))         data = {'total': amount}         callback = kwargs['callback']           return '{}({})'.format(callback, json.dumps(data))03:26
qwebirc61007urgh, sorry for the missing tabs... :-(03:27
*** AzidStar has joined #circuits03:34
AzidStarHere it is formated instead:03:35
AzidStarclass Data(JSONController):03:35
AzidStar    channel = "/data"03:35
AzidStar    def counter(self, **kwargs):03:35
AzidStar        ddb = donorsdb()03:35
AzidStar        amount = ddb.getSumOfDonationsFromDate(date(START_YEAR, START_MONTH, START_DAY))03:35
AzidStar        data = {'total': amount}03:35
AzidStar        callback = kwargs['callback']03:35
AzidStar        return '{}({})'.format(callback, json.dumps(data))03:35
*** qwebirc61007 has quit IRC03:35
*** AzidStar has quit IRC04:49
*** Romster has quit IRC05:53
*** Romster has joined #circuits06:31
*** Romster has quit IRC06:48
*** Romster has joined #circuits07:10
*** Romster has quit IRC07:22
*** Romster has joined #circuits07:33
*** robert_ has joined #circuits14:09
*** robert_ has quit IRC14:09
*** robert_ has joined #circuits14:09

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!