This file contains 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
# Bayram Kaya 17.03.2019 | |
# Wrapper function checks if requester has db_model instance | |
def check_profile(db_model): | |
def req_wrapper(func): | |
def func_wrapper(request): | |
placeholder = db_model.objects.filter(name=request.user) | |
if placeholder.exists(): | |
return func(True,request) | |
else: |
This file contains 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
/* | |
*Forked from Eli Grey https://gist.github.com/eligrey/384583 | |
* | |
*/ | |
// object.watch | |
if (!Object.prototype.watch) { | |
Object.defineProperty(Object.prototype, "watch", { | |
enumerable: false | |
, configurable: true |
NewerOlder