mirror of
https://github.com/kennethreitz/replit-py.git
synced 2026-06-05 23:10:18 +00:00
Finish all_pages_sign_in example
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
"""An example of the all_pages_sign_in() feature."""
|
||||
from replit import maqpy
|
||||
|
||||
app = maqpy.App(__name__)
|
||||
app.all_pages_sign_in(exclude=["/"])
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def index() -> str:
|
||||
return "Some introduction " + maqpy.Link("check out my page", href="/page")
|
||||
|
||||
|
||||
@app.route("/page")
|
||||
def page() -> str:
|
||||
return "Hello, if you are reading this you signed in."
|
||||
Reference in New Issue
Block a user