aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-02-18 23:46:54 +0100
committerPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-02-18 23:46:54 +0100
commitba7a966b5523b95c9ab338cc467693db48076877 (patch)
treeece52814b26e216ff7602c344177cdcebf7834f0
parentf22296328675e6776516773c5626425093777e51 (diff)
downloadjustice-ba7a966b5523b95c9ab338cc467693db48076877.tar.gz
Renaming changes
-rw-r--r--main.py2
-rw-r--r--models.py10
-rw-r--r--templates/extract.html2
3 files changed, 7 insertions, 7 deletions
diff --git a/main.py b/main.py
index 245d643..a23fa3f 100644
--- a/main.py
+++ b/main.py
@@ -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()
diff --git a/models.py b/models.py
index e50fcfa..5ffd568 100644
--- a/models.py
+++ b/models.py
@@ -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%">