diff options
-rw-r--r-- | main.py | 2 | ||||
-rw-r--r-- | models.py | 10 | ||||
-rw-r--r-- | templates/extract.html | 2 |
3 files changed, 7 insertions, 7 deletions
@@ -4,7 +4,7 @@ from db_setup import init_db, db_session from forms import JusticeSearchForm, CompanyForm from flask import flash, render_template, request, redirect # from models import Company, Soud -from models import Company, Obce, Ulice, Insolvency_Events, Predmet_Podnikani, Predmety_Podnikani_Association, Predmet_Cinnosti, Predmety_Cinnosti_Association, Zakladni_Kapital, Akcie, Nazvy, Sidlo, Sidlo_Association, Pravni_Forma_Association_v2, Pravni_Formy, Statutarni_Organ_Association, Statutarni_Organy, Pocty_Clenu_Organu, Zpusob_Jednani_Association, Child +from models import Company, Obce, Ulice, Insolvency_Events, Predmet_Podnikani, Predmety_Podnikani_Association, Predmet_Cinnosti, Predmety_Cinnosti_Association, Zakladni_Kapital, Akcie, Nazvy, Sidlo, Sidlo_Association, Pravni_Forma_Association_v2, Pravni_Formy, Statutarni_Organ_Association, Statutarni_Organy, Pocty_Clenu_Organu, Zpusob_Jednani_Association, Zpusob_Jednani from tables import Results init_db() @@ -177,7 +177,7 @@ class Statutarni_Organ_Association(db.Model): statutarni_organ_text = db.relationship("Statutarni_Organy", back_populates="company_statutarni_organ") company = db.relationship("Company", back_populates="statutarni_organ_text") pocet_clenu = db.relationship("Pocty_Clenu_Organu", backref="statutarni_organ_relation") - children = db.relationship("Zpusob_Jednani_Association", back_populates="parent") + zpusoby_jednani = db.relationship("Zpusob_Jednani_Association", back_populates="statutarni_organ") class Zpusob_Jednani_Association(db.Model): @@ -187,8 +187,8 @@ class Zpusob_Jednani_Association(db.Model): zpusob_jednani_id = db.Column(db.Integer, db.ForeignKey('zpusoby_jednani.id'), nullable=False) zapis_datum = db.Column(MyType) vymaz_datum = db.Column(MyType) - child = relationship("Child", back_populates="parents") - parent = relationship("Statutarni_Organ_Association", back_populates="children") + zpusob_jednani = relationship("Zpusob_Jednani", back_populates="zpusob_jednani_rship") + statutarni_organ = relationship("Statutarni_Organ_Association", back_populates="zpusoby_jednani") class Company(db.Model): @@ -342,8 +342,8 @@ class Pocty_Clenu_Organu(db.Model): vymaz_datum = db.Column(MyType) pocet_clenu_value = db.Column(db.String) -class Child(db.Model): +class Zpusob_Jednani(db.Model): __tablename__ = "zpusoby_jednani" id = db.Column(db.Integer, primary_key=True) zpusob_jednani_text = db.Column(db.String) - parents = db.relationship("Zpusob_Jednani_Association", back_populates="child")
\ No newline at end of file + zpusob_jednani_rship = db.relationship("Zpusob_Jednani_Association", back_populates="zpusob_jednani")
\ No newline at end of file diff --git a/templates/extract.html b/templates/extract.html index 18bf985..66845c7 100644 --- a/templates/extract.html +++ b/templates/extract.html @@ -67,7 +67,7 @@ <p><a href="/">Zpět na vyhledání.</a></p> -<p>Toto jsem extrahoval: {{ row.statutarni_organ_text[0].children[0].child.zpusob_jednani_text }}</p> +<p>Toto jsem extrahoval: {{ row.statutarni_organ_text[0].zpusoby_jednani[1].zpusob_jednani.zpusob_jednani_text }}</p> <table class= "table" style="width: 100%"> |