This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
******************************************************* | |
A pirate walks into a bar. The bartender notices that the pirate | |
has a steering wheel in his pants, and promptly inquires, "Sir, | |
I can't help but ask, why do you have a steering wheel in your | |
pants?" | |
With this the pirate replies, "Yaaar! Its driving me nuts!" | |
******************************************************* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.comments.signals import comment_was_posted | |
@receiver(comment_was_posted) | |
def my_callback(sender, **kwargs): | |
comment = kwargs.get('comment') | |
request = kwargs.get('request') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cookie_tz = $.cookie('tz'); | |
if (user_tz == null) { | |
if (cookie_tz == null) { | |
try { | |
var tmp_tz = jstz.determine_timezone(); | |
if (tmp_tz) { | |
user_tz = tmp_tz.name(); | |
$.cookie('tz', user_tz); | |
} | |
} catch(err) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Original script by Josh Fraser (http://www.onlineaspect.com) | |
* Continued and maintained by Jon Nylander at https://bitbucket.org/pellepim/jstimezonedetect | |
* | |
* Provided under the Do Whatever You Want With This Code License. | |
*/ | |
/** | |
* Namespace to hold all the code for timezone detection. | |
*/ |
OlderNewer