So this guys right here started my whole career. I watched this video a year ago and this video game me so much confidence, that now I have a full time job. I cant believe I just saw this video on my recommends! THAT YOU BRO!
The Bootstrap 5 Navbar still uses flexbox, but the concept of right and left, have changed to start and end for new RTL support. So, instead of float-right, use float-end Also, take attention that bootstrap 5 changed data-toggle to data-bs-toggle and data-target to data-bs-target
First off, excellent intro of both Flask and CRUD principles. One question though: I'm trying to get the first input field of the modal Add or Edit box to be in focus. I know bootstrap doesn't have the autofocus attribute so I tried to add the HTML5 attribute "autofocus" in the input tag of my first input field like so: . However, that doesn't seem to work. What should be done to get the focus on the first input field of the modal boxes?
Hello Parwiz, thank you so much for sharing your knowledge!! I enjoyed the tutorial and your explanation was clear. This encourage me to develop my own app and learn more about Flask. Regards.
Thank you so much. For the update method I used string query parameters to retrieve the employee id we are trying to edit. I made the form action go to "/update?id={{row.id}}", and used request.args['id'] to pull the ID from the url.
Assistindo em 2021. Muito boa didática! Fiz algumas coisas diferentes do vídeo pois já tinha um conhecimento, mas aprendi demais sobre post e get dentro do flask. Estava precisando justamente disso. Muito obrigada!
Thanks this video is very helpful. I was doing my with sequel query. Kind of stressful with the delete feature but I managed to fix after some long hours😂 Once again, thanks 🙏
@@ParwizForogh hello my friend why when i try to implement this app, this error comes up : TypeError: __init__() takes 1 positional argument but 3 were given, can u help me ?
A very good step by step lecture bro. Please a video how to add multiple form fields dynamically and bring them to the database (without modals adding multiple employees with the same submit button).
After Bootstrap Models chapter, after copying 'add employee' part, I am not able to open "Add New Employees" . I checked many times and did same from friend too, but still not getting. Pls help
Hi Riddhik, Was this issue solved when you were learning this course? Could you please spare a moment to help me with this? I also have been facing the same issue. Thank you in advance, though!
You didn't include the fact that one would have to install a driver before it connects to MySQL database. Although I have been using postreSQL with PyCharm(Python) following your interesting tutorial trying to connect it with MySQl, I have been having many errors, like... return __import__("MySQLdb") ModuleNotFoundError: No module named 'MySQLdb' but when I installed psycopg2 for PostgreSQL immediately it worked. So what do I need to do for this application to connect to MySQL 8.0?
Thank you, great tutorial, I have fully enjoyed! Couple of questions: When adding a new record line it goes to the bottom of the table. Can it go to the top row? Also, when updating a record (row) it goes to the bottom as well maintaining the ID number, that doesn't look right. Any thoughts please?
Great tutorial, just one thing i struggled with the well and jumbotron and couldn't get the header to work. It turns out that boostrap 4 uses cards and not wells.
Hi. I have a question. I have an error it says 'ModuleNotFoundError: No module named 'MySQLdb' I tried to download pymysql but it didn't work. And also the delete and edit button is not working. Help hahaha
But every time when I am pressing edit or delete my page is reloading, How to use prevent default here and only disappear the content which I need to delete
thanks so much it really helped me but i have one little issue, i use SQLite3 and if i try displaying my entries on the table, it displays the number of columns i have in the database but its blank.
Can you please share the source code or the repo link. This tutorial was much helpful but as of Dec 2022 few settings need to be added especially on M1/M2 Macs...
sir . i have one problem in app.py on line 2 : from flask_sqlalchemy import SQLAlchemy (when i run code it error ) it have install package SQLAlchemy i install ready but it have error can you breakup my problem?
while trying to edit the next data apart from the first I get an error: sqlalchemy.exc.PendingRollbackError, aside from this error everything works fine, but I am in flask-admin baseview
27:34 i'm getting error when i refreshed the page.. it show me this ------ werkzeug.routing.BuildError: Could not build url for endpoint 'insert'. Did you mean 'index' instead?
In app.py, make sure that your insert method's route is '/insert', and try again. Otherwise, go to index.html, then find the add modal (because this modal calls '/insert'), then find the form action inside it, then change "{{url_for('insert'}}" to "/insert" and make sure that "method" is set to "POST".
Why use ['GET, 'POST'] methods when 'DELETE' (when creating deleting route) is available. I tried but i had an error and couldn't make it work. anyone?
RuntimeError: Working outside of application context. This typically means that you attempted to use functionality that needed the current application. To solve this, set up an application context with app.app_context(). See the documentation for more information.
IF YOU HAVE ISSUE WITH MODAL: Your title block in index.html should look something like this: {% block title %} {% endblock %} not {% block title %} Home {% endblock %}
I'm not able to delete data please help me ERROR: "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
Thank you so much for sharing your knowledge. However, I faced the problem while deleting the entire database, the ID doesn't restart from 0, but continues the counting from where it stopped. Can you please help me to fix that issue?
Id is auto_increment. So, when we delete the data, the id is not return to previous number. Even we delete all data, id is not going to zero (but it will continue to add from last id number)
header.html should *not* extend base.html because that results in index.html's source consisting of *two* HTML documents (doctype, html, head, body and *again* doctype, html, head, body). Every .html which extends base.html will have all the tags contained in base.html and if inside index.html (which extends base.html) is included header.html which would extend base.html too, then index.html cosists of twice base.html (browser > View page source). header.html should consist only of: ... and all {% %} blocks should be removed from that file.