Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    ardo
    @ardohr_gitlab
    Hi..night all.
    Is the guillotina-react documentation still valid? I tried to install but can't login (python 3.7.11, Guillotina 6.3.15)
    ardo
    @ardohr_gitlab
    error message in guillotina application like this: [32mINFO←[0m: ::1:49704 - "←[1mGET /db/ HTTP/1.1←[0m" [32m200 OK←[0m
    origin http://localhost:3000 not allowed
    Roger Boixader Güell
    @rboixaderg
    Hi @ardohr_gitlab, have the allow_origin: config in your guillotina config? It's seems that is guillotina config problem and not guillotina_react problem
    ardo
    @ardohr_gitlab
    Hi Roger
    Thx a lot for your explanation. now guillotina_react is running well in my laptop
    ardo
    @ardohr_gitlab
    Hi all
    How does Guillotina handle relational data? Any examples?
    Ramon Navarro Bosch
    @bloodbare
    @ardohr_gitlab it has the driver for pg connection and you can reuse the connection pool for quering DB and do your own views. There is a small package we use for storing relational data as a field on a Guillotina Object : https://github.com/guillotinaweb/guillotina_pgfield
    you can define a field on an object that has a sql schema
    I hope it helps
    ardo
    @ardohr_gitlab
    Hi @bloodbare , Thank you. I'll try it.
    ardo
    @ardohr_gitlab
    Hi All. Sorry i have another question to ask.
    I tried to follow it step by step in the training document (on guillotina_chat). But when I click Add Message in the conversation there is an error as shown in the image. I've disabled the serialize script(serialize.py), but the error is still the same. Is there an explanation for this error ?
    Screenshot (1022).png
    ardo
    @ardohr_gitlab
    in debug mode there is'nt error message.
    Roger Boixader Güell
    @rboixaderg
    Hi @ardohr_gitlab, can you share the guillotina response?
    ardo
    @ardohr_gitlab
    Hi @rboixaderg. That is my mistake. Because the GMI Form seems to only display the Id and Title fields. Whereas in chat applications, the content schema only has a Text message field (without id and title). After changing required = True to False, there is no such error
    Roger Boixader Güell
    @rboixaderg

    You can override default Form to RequiredFieldsForm in registry. Or you can create your custom Form for your Type. Here there is an example:

    https://github.com/guillotinaweb/guillotina_react/blob/1383ea02bb89866921defab365b6b4de4d325743/e2e/example/components/guillotina.js#L23
    This guillotina has GMI type.

    ardo
    @ardohr_gitlab
    Thx a lot @rboixaderg , I'll try it
    ardo
    @ardohr_gitlab
    Hi all. Sorry i have another question. If the application to be built has a lot of time series data, does anyone here have any suggestions on how to do it using Guillotina?
    Ramon Navarro Bosch
    @bloodbare
    Hi Ardo, when I used time series I used PG specific logic for it, but u can use ES driver to provide time series or implement something like pgfields or specific view code agains any db like influxdb
    ardo
    @ardohr_gitlab
    Hi Ramon, thanks a lot for your explanation. What do you mean by the words PG specific logic? What do you think about timescaledb(Postgresql for timeseries) ? Looks like I'm interested in trying it out using pgfields in G.
    Ramon Navarro Bosch
    @bloodbare
    I meant PLSQL code to aggregate, bit hacky and only valid if its not massive data. Timescaledb looks really nice but never tested. I’m curious about how PG can scale for time series.
    ardo
    @ardohr_gitlab
    Thanks Ramon for the explanation
    alan runyan
    @runyaga
    @bloodbare if you have 10m for a quick chat - would apprecaite it. Dont see a way to DM you.
    Ramon Navarro Bosch
    @bloodbare
    hey alan, DMed you :)
    Katja Süss
    @ksuess
    Hi guillotina newbie here.
    For tests of a svelte app with guillotina backend I would like to set up via ansible a postgres docker container with guillotina configuration and some test content. Any documentation about this?
    Eric BREHAULT
    @ebrehault
    Hi @ksuess ! You can have a look to the AbFab setup. Here is the docker-compose running Guillotina (the abfab container) and Postgres https://github.com/ebrehault/abfab/blob/main/docker/docker-compose-local.yml
    and as you can see, it uses a Dockerfile-utils to load the Guillotina server with pre-defined content on the first start
    the script it calls is here https://github.com/ebrehault/abfab/blob/main/utils/init.sh, it just launch a Python program which uses requests to POST new contents in Guillotina (example: https://github.com/ebrehault/abfab/blob/main/utils/sync.py#L19)
    Eric BREHAULT
    @ebrehault
    But you could do the same thing with curl or wget
    Nil
    @nilbacardit26

    @ksuess
    To test guillotina you can add the fixtures of guillotina and pytest_docker.fixtures in your conftest.py:

    pytest_plugins = [
        "pytest_docker_fixtures",
        "guillotina.tests.fixtures",
        "my_app.fixtures
    ]

    Then in your fixtures.py you can use the db, and guillotina fixtures:
    Install first the pytest-docker-fixtures
    https://pypi.org/project/pytest-docker-fixtures/

    @pytest.fixture(scope="function")
    async def my_app(db, guillotina):
        resp, status = await guillotina(
            'POST', '/db',
            data=json.dumps({
                "@type": "Container",
                "title": "Container",
                "id": "container",
            }))
        assert status == 200

    and use it in your test foo_test.py

    async def test_foo(my_app):
        pass

    Run the test with:

    DATABASE=postgresql pytest foo_test.py

    This will automatically create a PG docker container, and the guillotina back end will point to it

    Hope this can be useful

    Katja Süss
    @ksuess
    Hi, thanks for your answers! Interesting how diverse testing could look like.
    My approach for a testing setup for cypress tests of the frontend is:
    ansible playbook that
    • creates postgres container
    • installs guillotina
    • starts guillotina
    • runs a postman request collection with 'newman'
    Katja Süss
    @ksuess
    the postman collection is assembled once by manually adding requests:
    • add group and testuser
    • create folders
    • add permissions for group on folders
    postman lets you add tests for each request
    postman lets you define a request that is done for an array of for example path and body (in my case: folder, permission to set)
    Ramon Navarro Bosch
    @bloodbare
    There are some examples on volto about cypress on top of guillotina: https://github.com/plone/volto/blob/master/cypress/support/guillotina.js and https://github.com/plone/volto/tree/master/g-api docker compose
    mejimaru
    @mejimaru
    Hello, I want to learn guillotina, does this framework different with fastapi?
    Ramon Navarro Bosch
    @bloodbare
    Hi @mejimaru . It differs as its more opinionsted on how to build singletons (utilities), object schema (zope.interface), url structure (traversal url) has security embedded (RBAC) and its not sqlalchemy based (kind of Nosql aproach with driver for pg and cockroach only)
    mejimaru
    @mejimaru
    Hi Ramon, Thank you for the explanation. I am waiting for the next tutorial with this lovely Guillotina, Simple Real App :)
    Sascha Gresk
    @zmijunkie
    Hi - how do I build myself a Plone with classic UI ? I do not need Volto ...
    Sascha Gresk
    @zmijunkie
    Indrajaya
    @jay009id_gitlab
    Hello, I have question regarding the guillotina_chat (https://github.com/guillotinaweb/guillotina_chat). Is this the right place?
    mejimaru
    @mejimaru
    Masih sepi om dsini :)
    Sascha Gresk
    @zmijunkie
    oh I try plone/public