Committer and PMC Member of Apache Superset
- ๐ซง Diving into music, code and underwater
- ๐ฑ Nurturing plants and open source projects
Reach out:
The Flask-AppBuilder Site
Committer and PMC Member of Apache Superset
Reach out:
The swagger documentation for the site is not showing up correct results. We would like to use this demo to showcase what the flask-appbuilder is capable of. Would love to have this issue resolved.
Link to the site:
http://flaskappbuilder.pythonanywhere.com/
Hi,
I am new to flask/flask-appbuilder and sqlalchemy.
I was looking at the employee sample and wanted to try implementing an employee log (clock-in time, comment) .
I want it so the logs can be displayed in the Department view as well as the employee view.
(view all logs for department ABC, view all logs for employee XYZ)
I don't want to use related_views.
I want the logs displayed in the regular listview. Without having to click on show for the show view.
How should you write the model for department, employee, and log. I'm not sure how to do the relationship part. I am a little inexperienced with using secondary, backref and primaryjoin.
How should you write the view ?
Heres a little code so you can look at what I'm doing
class Log(Model):
id = Column(Integer, primary_key=True)
department_id = Column(Integer, ForeignKey('department.id'), nullable=False)
department = relationship("Department")
employee_id = Column(Integer, ForeignKey("employee.id"), nullable=False)
employee = relationship("Employee")
comment = Column(String, default='OK', nullable=False)
date = Column(DateTime, default=func.now(), nullable=True)
class Department(Model):
id = Column(Integer, primary_key=True)
name = Column(String, unique = True, nullable=False)
def repr(self):
return self.name
class Employee(Model):
id = Column(Integer, primary_key=True)
name = Column(String, unique=True, nullable=False)
department_id = Column(Integer, ForeignKey('department.id'), nullable=False)
department = relationship("Department")
Any help is appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.