Skip to content

Instantly share code, notes, and snippets.

@bigeyex
Created March 1, 2020 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bigeyex/634476b9221c2415647d0dc6528d531a to your computer and use it in GitHub Desktop.
Save bigeyex/634476b9221c2415647d0dc6528d531a to your computer and use it in GitHub Desktop.
A basic example of AdminUI
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