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
# Django provides some great and easy to use decorators | |
# that accept simple functions that you could use to | |
# perform certain tests on the user. However, if your test | |
# depends on some parameter within the request object (like mine did), | |
# you could do something like: | |
from django.contrib.auth import REDIRECT_FIELD_NAME | |
from django.utils.decorators import available_attrs | |
from django.utils.http import urlquote |
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
function( d ) { | |
// Create a copy of this date object | |
var target = new Date(d.valueOf()); | |
// ISO week date weeks start on monday | |
// so correct the day number | |
var dayNr = (d.getDay() + 6) % 7; | |
// Set the target to the thursday of this week so the |