]>
git.ipfire.org Git - people/shoehn/ipfire.org.git/blob - webapp/backend/misc.py
22dce10b9b3ff3c25f988c09e2336f625cf2856d
4 def __init__(self
, backend
):
13 return self
.backend
.accounts
17 return self
.backend
.planet
20 class Singleton(type):
22 A class for using the singleton pattern
25 def __init__(cls
, name
, bases
, dict):
26 super(Singleton
, cls
).__init
__(name
, bases
, dict)
29 def __call__(cls
, *args
, **kw
):
30 if cls
.instance
is None:
31 cls
.instance
= super(Singleton
, cls
).__call
__(*args
, **kw
)