-
Notifications
You must be signed in to change notification settings - Fork 0
/
Admin.py
37 lines (23 loc) · 882 Bytes
/
Admin.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
33
34
35
36
37
import webapp2
from MasterHandler import MasterHandler
from DataModels import UserProfile
from DataManipulation import deleteProfile
#-----------------------------------------------------------------------------
# Request handler
class AdminHandler(MasterHandler):
#****************************
# Views
#
def userprofile(self):
self.sendContent('templates/Admin_UserProfile.html',
activeEntry = "",
templateVariables = {
'userProfiles': UserProfile.all(),
})
def deleteprofile(self):
deleteProfile(self.getRequiredParameter("key"))
self.sendJsonOK()
#-----------------------------------------------------------------------------
app = webapp2.WSGIApplication([
(r'/admin/(\w+)', AdminHandler),
], debug=True)