Giter VIP home page Giter VIP logo

fastui-tutorials's Introduction

Hi there! 👋

Twitter Follow LinkedIn Instagram GitHub Followers

Hello, I am Sezer and I am from Turkey. I am a self-taught software developer, and my passions are writing code, solving problems, automating things, and building software (quite standard isn't it).

I say knowledge increases as it is shared, so I share my knowledge and try to help people.

Me and a few of my friends founded FastAPI Türkiye to make FastAPI more accessible in Turkey. What do I mean by more accessible? Our first goal was to translate the entire FastAPI documentation into Turkish. While doing this, we create a community around it. C'mon and join us!

My Skills

Sezer's github stats

fastui-tutorials's People

Contributors

hasansezertasan avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sstrelnikov

fastui-tutorials's Issues

PageEvent

Hello! I need help with PageEvent.

I want receive Id in def modal_view from def deliveriy_choice field 'id'
How I can do this?
I have this code

@router.get('/add/delivery', response_model=FastUI, response_model_exclude_none=True)
async def deliveriy_choice(
        session: AsyncSession = Depends(get_async_session)
):
    filters = DeliveryFilter()
    deliveries = await Delivery.get_by(session, filters)
"""I need id from column 'id' """
    return page(
        c.Heading(text='Add', level=2),
        c.Paragraph(text='DB'),
        c.Table(
            data_model=DeliveryTable,
            data=deliveries,
            columns=[
                DisplayLookup(
                    field='id', on_click=PageEvent(
                        name='server-load',
                        context={'id': '{id}'}
                    )
                ),
                DisplayLookup(field='create_at', mode='date'),
                DisplayLookup(field='shop', mode='auto')
            ]
        ),
        c.Div(
            components=[
                c.ServerLoad(
                    path='/mission/delivery/dynamic-content/{id}',
                    load_trigger=PageEvent(name='server-load'),
                    components=[c.Text(text='before')],
                ), ],
            class_name='py-2',
        )
    )


@router.get('/delivery/dynamic-content/{id}', response_model=FastUI, response_model_exclude_none=True)
async def modal_view(
        session: AsyncSession = Depends(get_async_session),
        id: str | None = None
) -> list[AnyComponent]:
"I need id here"
    print(id)
    # delivery = await Delivery.get_by(session, filters=DeliveryFilter(id=id))
    await asyncio.sleep(0.5)
    return [
        c.Paragraph(text=f'Good'),
            ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.