show a list of possible imagesets instead of redirecting to pack_1a on admin

This commit is contained in:
thmsn
2023-11-23 01:10:29 +00:00
parent 00992dacef
commit a1432b5be4
3 changed files with 98 additions and 2 deletions
+5 -2
View File
@@ -101,7 +101,10 @@ class MapEditor(webapp.RequestHandler):
class Selector(webapp.RequestHandler): #NOTICE: << Publicly available at /communityselector! >> [10/10/16]
@ndb.toplevel
def get(self,name):
if not name: self.redirect("/admin/selector/pack_1a"); return
if not name:
whtml(self,"utility/htmls/imagesets/select-imageset.html",domain=gdi(self),imagesets=imagesets)
return
# TODO: Render alist of image sets that you can choose instead of redirecting
name=name.split("/")[0]
file=imagesets[name]["file"]
size=imagesets[name]["size"]
@@ -110,7 +113,7 @@ class Selector(webapp.RequestHandler): #NOTICE: << Publicly available at /commun
xs=[]; ys=[]
for i in xrange(width/size): xs.append(i)
for j in xrange(height/size): ys.append(j)
whtml(self,"utility/htmls/selector.html",domain=gdi(self),name=name,file=file,size=size,width=width,height=height,xs=xs,ys=ys,scale=3)
whtml(self,"utility/htmls/imagesets/selector.html",domain=gdi(self),name=name,file=file,size=size,width=width,height=height,xs=xs,ys=ys,scale=3)
def post(self,name): self.get(name)
class PhotoUpload(blobstore_handlers.BlobstoreUploadHandler):