I'm trying to add a new screen to Subiquity but Subiquity gets stuck every time I run it.
running server pid 40812
connecting... /
To create my controller I used an example from DESIGN.md My server controller class is as below:
import logging
from subiquity.common.apidef import API
from subiquity.server.controller import SubiquityController
log = logging.getLogger('subiquity.server.controllers.example')
class ExampleController(SubiquityController):
endpoint = API.example
model_name = 'example'
async def GET(self) -> str:
return self.model.thing
async def POST(self, data: str):
self.model.thing = data
await self.configured()
Also, I added my Example controller class to controllers[] in subiquity/server/server.py:
controllers = [
# other classes
"Kernel",
"Keyboard",
"Example",
"Zdev",
"Source",
# some other classes
]
And added example = simple_endpoint(str) to apidef.py
My model as simple as possible:
class ExampleModel:
thing = "example_var"
What might cause the problem? If I remove my Example controller from controllers[], Subiquity works but obviously doesn't use my controller.