xnuinside / gino-admin

Admin Panel for GinoORM - ready to up & run (just add your models)
https://gino-admin.readthedocs.io/en/latest/
MIT License
49 stars 9 forks source link

Customize add/edit page #44

Closed nmzgnv closed 2 years ago

nmzgnv commented 2 years ago

How can I customize the edit page? Id field available for editing, no default values for fields. Lib version: 0.2.5

Simple model:

class User(db.Model):
    __tablename__ = 'users'

    pk = Column(db.String(), primary_key=True, unique=True)

    telegram_id = Column(Integer())
    nickname = Column(String(length=33), default='-')

    def __str__(self):
        return f'{self.nickname} - {self.telegram_id}'

image

nmzgnv commented 2 years ago

Is it available to hide field?

xnuinside commented 2 years ago

@nmzgnv hi, I did not update library a long time - it's not available now, but it's easy to add, I can add to config some field like 'hide_columns' that expect list of Model.column_name that will be hided. It is will be ok? I can add it quickly.

nmzgnv commented 2 years ago

@xnuinside It will be great, I can help :0

xnuinside commented 2 years ago

added in version gino-admin==0.3.0 (already released)

https://github.com/xnuinside/gino-admin/blob/master/CHANGELOG.txt#L3 - description

& sample - https://github.com/xnuinside/gino-admin/blob/master/examples/base_example/src/app.py#L52

xnuinside commented 2 years ago

@nmzgnv if needed something more - feel free to open new issue or PR