2016-03-31 16:03:38 +08:00
|
|
|
from flask import render_template, redirect, request
|
|
|
|
from webViews.dockletrequest import dockletRequest
|
|
|
|
from webViews.view import normalView
|
|
|
|
|
|
|
|
|
|
|
|
class userActivateView(normalView):
|
|
|
|
template_path = 'user/activate.html'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def get(self):
|
|
|
|
userinfo = dockletRequest.post('/user/selfQuery/')
|
|
|
|
userinfo = userinfo["data"]
|
|
|
|
if (userinfo["description"] == ''):
|
|
|
|
userinfo["description"] = "Describe why you want to use Docklet"
|
|
|
|
return self.render(self.template_path, info = userinfo)
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def post(self):
|
2016-04-27 15:59:33 +08:00
|
|
|
dockletRequest.post('/register/', request.form)
|
2016-03-31 16:03:38 +08:00
|
|
|
return redirect('/logout/')
|