mirror of
https://github.com/kennethreitz/replit-py.git
synced 2026-06-05 06:56:14 +00:00
Bugfix: Use signin() for needs_sign_in default
Without this, sign in button was created in page head making it invisible
This commit is contained in:
@@ -26,7 +26,10 @@ def sign_in(title: str = "Please Sign In") -> Page:
|
||||
return Page(title=title, body=sign_in_snippet)
|
||||
|
||||
|
||||
def needs_signin(func: Callable = None, login_html: str = sign_in_snippet) -> Callable:
|
||||
sign_in_page = sign_in()
|
||||
|
||||
|
||||
def needs_sign_in(func: Callable = None, login_res: str = sign_in_page) -> Callable:
|
||||
"""A decorator that enforces that the user is signed in before accessing the page.
|
||||
|
||||
Args:
|
||||
|
||||
Reference in New Issue
Block a user