Created
March 1, 2020 05:37
-
-
Save bigeyex/634476b9221c2415647d0dc6528d531a to your computer and use it in GitHub Desktop.
A basic example of AdminUI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from adminui import * | |
app = AdminApp() | |
def on_submit(form_data): | |
print(form_data) | |
@app.page('/', 'form') | |
def form_page(): | |
return [ | |
Form(on_submit = on_submit, content = [ | |
TextField('Title', required=True), | |
TextArea('Description'), | |
FormActions(content = [ | |
SubmitButton('Submit') | |
]) | |
]) | |
] | |
if __name__ == '__main__': | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment