-
Notifications
You must be signed in to change notification settings - Fork 3
/
const.py
32 lines (30 loc) · 1019 Bytes
/
const.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import os
import webapp2
import jinja2
from google.appengine.ext import ndb
from google.appengine.api import users
import logging
tEnviron = os.environ.copy()
if tEnviron['SERVER_SOFTWARE'] == 'Development/2.0':
isGoogleServer = False
logging.info('THIS IS A DEVELOPMENT SERVER')
else:
logging.info('THIS IS A GOOGLE SERVER')
isGoogleServer = True
class Constant(ndb.Expando):
strReference = ndb.StringProperty()
strCampaignCost = ndb.IntegerProperty(default=5)
strFreeCampaignAllowance = ndb.IntegerProperty(default=2)
strTotalActiveCampaigns = ndb.IntegerProperty(default=0)
strAppURL = ndb.StringProperty(default="https://www.p2ploans.site")
strPromotionCost = ndb.IntegerProperty(default=5)
def writeReference(self,strinput):
try:
strinput = str(strinput)
if strinput != None:
self.strReference = strinput
return True
else:
return False
except:
return False