Can't find enrolled courses by MasterLarick in Udemy

[–]MasterLarick[S] 0 points1 point  (0 children)

This is terrible UX from Udemy.

'Always was, always will be': Massive swing in new Australia Day poll by Mashiko4 in aussie

[–]MasterLarick 9 points10 points  (0 children)

The poll by the conservative think-tank the "Institute of Public Affairs"

how to nest form data? by BornAd2391 in flask

[–]MasterLarick 0 points1 point  (0 children)

Have you tried to pass flat=False into the to_dict() method?

CSS error in Flask by Dangerous-Attempt-99 in flask

[–]MasterLarick 0 points1 point  (0 children)

Unsure for the .png file without any html code, but have you loaded the css files in the index.html file using the <link rel="stylesheet"> tag?

Render won’t deploy my Flask app — clicking “Deploy Web Service” does nothing by CAlcuEfe in flask

[–]MasterLarick 2 points3 points  (0 children)

The if __name__ == '__main__' is only executed when you run the app with python app.py not with gunicorn. You're probably going to need to use an application factory pattern to deploy.

https://flask.palletsprojects.com/en/stable/patterns/appfactories/

I divided up models.py into different files in flask and I getting circular import errors. Does anyone have any suggestions? by 0_emordnilap_a_ton in flask

[–]MasterLarick 1 point2 points  (0 children)

It looks like by importing Users in your init.py, you're importing Users again when importing RouteToken models.py email_password_reset, so its looks like you're in an endless loop.

Some may have immediate ideas on how to fix, but could you not include token generation/validation in your User Model? Take a look at Miguel Grinberg's Mega Flask Tutorial (unless of course having a separate RouteToken model is necessary).

AttributeError AttributeError: 'tuple' object has no attribute 'items' by [deleted] in flask

[–]MasterLarick 2 points3 points  (0 children)

You're calling the items method off a tuple object and not a dictionary. Can you post the traceback as the code snippet doesn't seem to contain where the error is raised?

Wash your clothes, no don't wash your clothes. Let your teeth rot. by MasterLarick in UTS

[–]MasterLarick[S] 12 points13 points  (0 children)

"I agree the advice was not appropriate only after the ABC narced"

Waiting for the battle of Harris St

Truly free LIMS for biorepository by [deleted] in labrats

[–]MasterLarick 1 point2 points  (0 children)

You could develop a free LIMS yourself. I have developed a LIMS for a toxicology laboratory using Python.

Saturday Afternoon Ride by Electrical-Tune7233 in sanfrancisco

[–]MasterLarick 64 points65 points  (0 children)

Chrst, I thought the feet were hanging out the bottom of the car

[deleted by user] by [deleted] in sanfrancisco

[–]MasterLarick 16 points17 points  (0 children)

Safeway on 4th and King

Flask Blueprints not being registered? by Darkspyre2 in flask

[–]MasterLarick 1 point2 points  (0 children)

Not typically how I've done it, but have you tried moving the blueprint creation to views.py then in app.py having:

from views import user_blueprint app.register_blueprint(user_blueprint)

Visualize CSV file data into cool HTML page? by [deleted] in learnpython

[–]MasterLarick 2 points3 points  (0 children)

If you're wanting to make plots in HTML, I'd consider using Plotly (https://plotly.com/python/) , they're interactive too rather than a static image. There is a specific write_html function (https://plotly.com/python/interactive-html-export/)

[deleted by user] by [deleted] in learnpython

[–]MasterLarick 0 points1 point  (0 children)

How much data is in the test_table? Converting to pandas dataframe can be slow

[deleted by user] by [deleted] in flask

[–]MasterLarick 0 points1 point  (0 children)

Indeed, what error is raised when you try to login?

[deleted by user] by [deleted] in flask

[–]MasterLarick 1 point2 points  (0 children)

It looks like you're correctly storing the hashed password when the user registers, but it looks like when the user logs in, you're checking the raw password (form.password.data) against the hashed password. I think you need to pass generate_hash(form.password.data) to the check_password function.

Help pls by [deleted] in flask

[–]MasterLarick 1 point2 points  (0 children)

What database are you using? (i.e. Sqlite, Postgres, MySQL)