Join my free course on the basics of Flask-SQLAlchemy: prettyprinted.com/flasksql
@jonathanwarner24206 жыл бұрын
My wife asked me, why I quitted django, I told her that there is no more django content from Pretty Printed (with tears in my eyes)
@prettyprinted6 жыл бұрын
lol don't worry, I'll cover more Django.
@madnessgain4434 жыл бұрын
lol
@brunosantos36725 жыл бұрын
I am using Flask for an educational project. Your videos are helping a lot. Great work, thanks!
@scicommerce4 жыл бұрын
Thanks for the tips also
@aminemellef54013 жыл бұрын
Nice content gr8 job
@pipi_delina3 жыл бұрын
@prettyprint... do you have a tutorial on how to insert data into the parent and child tables with a little bit realistic project? kind regards
@jeboisdupetitlait4 жыл бұрын
Hi Anthony Thanks for your videos. I have a question about the backref, you chose parent as the name. Does this mean that the column in the child class needs to be named parent_id ? or are these 2 resources completely uncorrelated ? Thanks a lot.
@bogdanvelica2 жыл бұрын
Any idea who you can get the data in jinja2 tempalte from a child template? Usually i used (from your tutorials) current_user.firstname when the firstname was in the User table, but I we move that to UserDetails table, how do we get that? Thank you
@noobdaaviacao5 жыл бұрын
I'm in doubt about it. How is the structure of the code to identify the user who made a post? Is it the route or the form? I'm stuck in this car in the flask is it helping me?
@prettyprinted5 жыл бұрын
The best approach would be in the route. If you use something like Flask-Login, then you can set the author of the post to be the current logged in user.
@justaniket2 жыл бұрын
i am getting out of context error dont know why even though i followed the same steps
@ahmedlimam22414 жыл бұрын
How do we add a Column to Parent that shows all of his children?
@ryansheppard64995 жыл бұрын
Thank you for this video! Can the parent have the one-to-one relationship with the child, but also have a one-to-many relationship with another table?
@l.s.87934 жыл бұрын
yes, just set uselist=True (or omit this argument altogether, as it's set to true by default) for the table you want to have a one-to-many relationship with. Like so: one_to_one = db.relationship('Child1', backref='parent', uselist=False) one_to_many = db.relationship('Child2', backref='parent', uselist=True)
@farzinashouri22973 жыл бұрын
In the line child = db.relationship(....) what is child? I mean is it table name? or record? or just an arbitrary name?
@naheliegend52223 жыл бұрын
how to create a parent related to the first child with no parent anymore?
@aravindc_v12325 жыл бұрын
what is that database view tool..?
@prettyprinted5 жыл бұрын
sqlitebrowser.org/
@alexd74664 жыл бұрын
using 'Child' and 'Parent' in this context doesn't make sense, because a child/parent relation is usually M2M. A better example could be for example Student - student_IDCard