How can I organize the structure tables of the Django database?

Good day! I have a plan for the database structure.

An example is in the figure below.

For example, I have - all coffee shops - within one region - state or several regions.


I am trying to make a variant for entering data into database tables.

I have a small table of the Django model - I enter data into it - information, for example, about a cafe - basic.

I enter information through the Form. Through the Form, which is based on the Django model.

In this form, respectively, there are only a few fields - those that are basic information about the cafe.

Then I want to supplement the database with other tables.

Each of the subsequent tables must be linked to the base table and, accordingly, have the same number of rows as the base table.

Each of the subsequent tables - only expands the base with other data.

How can I write this in the Django models to link these tables.

When filling in the second and subsequent Django tables - using the Django Form - you will need to select a cafe in the drop-down list from the base table - that is, the cafe for which the information will be entered.

We select cafe and fill in the data for it in the form cells.

And then so that it is saved in the database accordingly - by linking to the base table for the corresponding row of the cafe for which the form was filled out.


In one city there are several cafes. In total, there can be 200 cafes and 10 cities.

The problem is how to enter data on cafes in the database tables.

And also change them if necessary. Enter data through forms.

Each cafe also has the following parameters - address, Internet page, profitability, income, number of staff, i.e. data belonging to one cafe. As well as staff and menu.

I think to first enter the cities in which there will be cafes. And then enter the names of the cafes.

And even later other parameters through other forms.

How can I make it so that at the second stage only the name, address is entered and then successively filled with other data?

How can I organize the structure of entering the city / restaurant tables of the Django database?

from django.db import models

# Create your models here.

class CityCafe (models.Model):
    city = models.CharField(verbose_name="City")


class ObjectCafe (models.Model):
    name = models.TextField(verbose_name="Cafe Name")
    name_city = models.ForeignKey(CityCafe)


class BaseParametrCafe (models.Model):
   # type_object = models.Choices 
   # type_working = models.Choices
    value_budget = models.FloatField

    name_object = models.OneToOneField(ObjectCafe, null=False, on_delete=models.CASCADE) 


from django import forms
from models import *


class FormCites (forms.ModelForm):

    class Meta:
        model = CityCafe
        fields = "__all__"


class FormObjects (forms.ModelForm):

    class Meta:
        model = ObjectCafe
        fields = "__all__"


class FormObjectsParametr (forms.ModelForm):

    class Meta:
        model = BaseParametrCafe
        fields = "__all__"



from django.shortcuts import render

from models import *

from forms import *


def form_cites_view (request):
    form = FormCites(request POST or None)
    if form.is_valid():
        post = form.save()
        post.save()
    return render(request, "form_1.html", {"form": form})

# Create your views here.