Commit dbc720c0 authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

Merge branch 'small-fixes-pydantic' into 'main'

A couple of fixes for section 6

See merge request !29
parents d1c64457 b6e5b5e3
Loading
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -289,7 +289,7 @@ This command will download the template to a directory called `pydantic_mvvm`. C

*   **What is your project name?**

    > Enter `Advanced Pydantic`
    > Enter `Trame with Pydantic`

*   **What is your Python package name (use Python naming conventions)?**

@@ -354,14 +354,17 @@ class MainViewModel:
    def __init__(self, _, binding: BindingInterface):
        self.settings = SettingsModel()
        self.settings_bind = binding.new_bind(self.settings)        
        
    def update_view(self):
        self.settings_bind.update_in_view(self.settings)
```

3. In your view, remove all other fields and add the following InputField (`src/trame_with_pydantic/app/views/main.py`) (Modify):

```python

    def __init__(self) -> None:
        ....
        self.view_model.settings_bind.connect("settings")
        ....

...
    with layout.content:
        with vuetify.VRow(align="center", classes="mt-4"):