- Notifications
You must be signed in to change notification settings - Fork0
Curso para aprender desarrollo frontend Web con Python puro desde cero. Elaborado durante las emisiones en directo desde Twitch de MoureDev.
License
Awhitter/python-web-test
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is the base Reflex template - installed when you runreflex init.
If you want to use a different template, pass the--template flag toreflex init.For example, if you want a more basic starting point, you can run:
reflex init --template blank
This template has the following directory structure:
├── README.md├── assets├── rxconfig.py└── {your_app} ├── __init__.py ├── components │ ├── __init__.py │ └── sidebar.py ├── pages │ ├── __init__.py │ ├── dashboard.py │ ├── index.py │ └── settings.py ├── styles.py ├── templates │ ├── __init__.py │ └── template.py └── {your_app}.pySee theProject Structure docs for more information on general Reflex project structure.
In this template, the pages in your app are defined in{your_app}/pages/.Each page is a function that returns a Reflex component.For example, to edit this page you can modify{your_app}/pages/index.py.See thepages docs for more information on pages.
In this template, instead of usingrx.add_page or the@rx.page decorator,we use the@template decorator from{your_app}/templates/template.py.
To add a new page:
- Add a new file in
{your_app}/pages/. We recommend using one file per page, but you can also group pages in a single file. - Add a new function with the
@templatedecorator, which takes the same arguments as@rx.page. - Import the page in your
{your_app}/pages/__init__.pyfile and it will automatically be added to the app.
In order to keep your code organized, we recommend putting components that areused across multiple pages in the{your_app}/components/ directory.
In this template, we have a sidebar component in{your_app}/components/sidebar.py.
As your app grows, we recommend usingsubstatesto organize your state.
You can either define substates in their own files, or if the state isspecific to a page, you can define it in the page file itself.
About
Curso para aprender desarrollo frontend Web con Python puro desde cero. Elaborado durante las emisiones en directo desde Twitch de MoureDev.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- HTML72.7%
- Python26.0%
- Other1.3%