-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fifthaccess
committed
Apr 26, 2022
1 parent
68e6b60
commit 0cf861f
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from ast import Del | ||
from operator import index | ||
from pyexpat import model | ||
import string | ||
from click import edit | ||
from flask import Flask, redirect, request, flash | ||
from flask.templating import render_template | ||
from flask import Blueprint | ||
import sqlalchemy | ||
import sqlalchemy.orm | ||
from model.models import Kuenstler, db | ||
from forms.Manager import ManagerForm , DeleteManagerFrom, editManagerForm | ||
from model.models import Manager | ||
|
||
kuenstler_blueprint = Blueprint('kuenstler_blueprint',__name__) | ||
|
||
|
||
@kuenstler_blueprint.route("/kuenstler") | ||
def manager_view(): | ||
session : sqlalchemy.orm.scoping.scoped_session = db.session | ||
|
||
kuenstler = session.query(Kuenstler).order_by(Kuenstler.KuenstlerId).all() | ||
|
||
return render_template("manager/viewmanagers.html", managers = kuenstler, headline = "Managers") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from operator import imod | ||
from flask_wtf import FlaskForm | ||
from wtforms.fields.datetime import DateField | ||
from wtforms.fields.simple import BooleanField, StringField, TextAreaField ,HiddenField | ||
from wtforms.fields import DecimalField, FieldList , SelectField | ||
from wtforms import validators | ||
from model.models import Kuenstler | ||
import sqlalchemy | ||
import sqlalchemy.orm | ||
from model.models import Manager | ||
from model.models import db | ||
|
||
class KuenstlerForm(FlaskForm): | ||
KuenstlerId = HiddenField("KuenstlerId") | ||
ManagerID = HiddenField("ManagerID") | ||
Vorname = StringField("Vorname") | ||
Nachname = StringField("Nachname") | ||
Herkunftsland = StringField("Herkunftsland") | ||
Gehalt = DecimalField("Gehalt") | ||
|
||
|
||
class UserDetails(FlaskForm): | ||
group_id = SelectField('Group') | ||
|
||
#session : sqlalchemy.orm.scoping.scoped_session = db.session | ||
#managers = session.query(Manager).order_by(Manager.ManagerId).all | ||
|
||
#form.group_id.choices = [(g.Vorname.data , g.Nachname.data) for g in managers] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters