templates_auth_messagesdir = $(templates_authdir)/messages
+templates_auth_modules_DATA = \
+ src/templates/auth/modules/password.html \
+ src/templates/auth/modules/password.js
+
+templates_auth_modulesdir = $(templates_authdir)/modules
+
templates_blog_DATA = \
src/templates/blog/author.html \
src/templates/blog/base.html \
templates_people_messagesdir = $(templates_peopledir)/messages
-templates_people_modules_DATA = \
- src/templates/people/modules/password.html \
- src/templates/people/modules/password.js
-
-templates_people_modulesdir = $(templates_peopledir)/modules
-
templates_static_DATA = \
src/templates/static/about.html \
src/templates/static/legal.html \
# UI Modules
"ui_modules" : {
+ # Auth
+ "Password" : auth.PasswordModule,
+
# Blog
"BlogHistoryNavigation": blog.HistoryNavigationModule,
"BlogList" : blog.ListModule,
# Docs
"DocsHeader" : docs.HeaderModule,
- # People
- "Password" : people.PasswordModule,
-
# Nopaste
"Code" : nopaste.CodeModule,
import urllib.parse
from . import base
+from . import ui_modules
class AuthenticationMixin(object):
def login(self, account):
self.redirect("%s?%s" % (params.get("return_sso_url"), qs))
+class PasswordModule(ui_modules.UIModule):
+ def render(self, account=None):
+ return self.render_string("auth/modules/password.html", account=account)
+
+ def javascript_files(self):
+ return "js/zxcvbn.js"
+
+ def embedded_javascript(self):
+ return self.render_string("auth/modules/password.js")
+
+
class APICheckUID(base.APIHandler):
@base.ratelimit(minutes=1, requests=100)
def get(self):
self.current_user.consents_to_promotional_emails = False
self.render("people/unsubscribed.html")
-
-
-class PasswordModule(ui_modules.UIModule):
- def render(self, account=None):
- return self.render_string("people/modules/password.html", account=account)
-
- def javascript_files(self):
- return "js/zxcvbn.js"
-
- def embedded_javascript(self):
- return self.render_string("people/modules/password.js")