How to make baserow as part of a separate app inside a Django project?

I build a PurchaseOrder system using Django for my client. It’s a self-hosted system.

I like to use Baserow UI to allow my clients to fill up data and retrieve data based on the models I create in the PurchaseOrder.

I am not sure how to do this? ideally the self-hosted part should be a separate Django app in the same codebase somehow. That way, then the BaseRow backend can access my custom written models.

I am already using docker to run the postgres and django portions on the production server.

I don’t mind exposing the baserow brand name. I just want that UI to allow my non technical end users have a more pleasant way of interacting with my custom django project data.

Can explain to me how to get this done if possible?

I also am taking @olgatrykush advice to simply post my question here as advised here

Hi @simkimsia sorry for the delay.

Just to double check, you want to use Baserow as a GUI for existing normal Django models inside your codebase? Right now Baserow can only display its own special user generated models, and does not support rendering other Django models in its Grid views etc. I’ve attempted to add support so Baserow can display any Django model previously, I believe it is possible however it is complicated and so I wasn’t able to finish this.

If you were instead to make Purchase Order/your other tables in Baserow using Baserows API/GUI, you could then access Django models representing these tables using our python API:

PurchaseOrderGeneratedModel = Table.objects.get(id=pk_of_purchase_order_table).get_model()

Thank you @nigel

Sorry somehow i missed the notifcation.

So right now i am running a Django 3.2 container on a Ubuntu image, and a postgres container using postgres image and all the containers running in Docker.

What’s the easiest way to install Baserow in a way that integrates with my existing setup?

In fact, this is my local.yml which is very similar to my production.yml

version: "3.9"

volumes:
  postgres14_data_local: {}
  postgres14_backup_local: {}

services:
  django:
    platform: linux/amd64
    build:
      context: .
      dockerfile: ./compose/local/django/Dockerfile
    image: eno-a3-django_local_django
    stdin_open: true   # Add this line into your service for PDB debugger to work
    tty: true   # Add this line into your service for PDB debugger to work
    depends_on:
      - mailhog
      - redis
      - postgres_14
    volumes:
      - .:/app
    env_file:
      - ./.envs/.local/.django
      - ./.envs/.local/.postgres_14
    ports:
      - "8000:8000"
    command: /start

  postgres_14:
    platform: linux/amd64
    build: ./compose/production/postgres_14/
    image: eno-a3-django_production_postgres_14
    container_name: postgres
    # command: postgres -c config_file=/etc/postgresql.conf
    volumes:
      - postgres14_data_local:/var/lib/postgresql/data
      - postgres14_backup_local:/backups
      - ./compose/production/postgres_14/postgresql.conf:/etc/postgresql.conf
    env_file:
      - ./.envs/.local/.postgres_14
    ports:
      - "5432:5432"

  mailhog:
    image: mailhog/mailhog:v1.0.0
    ports:
      - "8025:8025"

  redis:
    platform: linux/amd64
    build: ./compose/production/redis/
    container_name: eno-a3-django_local_redis
    restart: always

Hi @simkimsia

Currently we don’t publish Baserow as an installable Django app (though we want to one day!). That means you are probably going to have to resort to using something like git submodules and cloning our entire code base into your own and then manually hooking everything yourself in your own Django app.

Alternatively you could run Baserow standalone completely separately. Use Baserow and create the tables you want inside of it, and then access the postgres tables Baserow created in its database in a separate Django application or using Baserow’s webhook features to integrate the two apps. This is probably much easier until we offer an easy way of installing Baserow as a Django app.