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
Executing a new task periodically in celery like in java quartz, is as simple as: | |
0) Define your tasks in a dictionary (function check_users in background_tasks module will execute every half an hour): | |
beat_schedule = { | |
'check_users': { | |
task: 'backoffice.blueprints.users.background_tasks.check_users' | |
schedule: 1800.0 | |
} | |
} |
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 distutils.version import StrictVersion | |
class User(object): | |
def __init__(self, version='2.0.0'): | |
self.app_version = version | |
class UserArgument(User): | |
COMPATIBLE_TYPE=User | |
def __init__(self, input): | |
self.applies = 1 |
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
String.stopWords = 'a,an,as,at,before,but,by,for,from,is,in,into,like,of,off,on,onto,per,since,than,the,this,that,to,up,via,with'; | |
String.escapeRegExp = function(str) { | |
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); | |
}; | |
String.prototype.replaceAll = function (find, replace) { | |
return this.replace(new RegExp(String.escapeRegExp(find), 'g'), replace); | |
}; |
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
Welcome to BrowserId. | |
This module provides a 'Login' button inside login form and a configurable block. | |
It also defines a Permission called 'log in using browserid', which needs to be enabled for anonymous role in order to show the Login buttons. |
NewerOlder