FAQ: Introduction to Accounts - Associating User Actions

This community-built FAQ covers the “Associating User Actions” exercise from the lesson " Introduction to Accounts".

Paths and Courses
This exercise can be found in the following Codecademy content:

Build Python Web Apps with Flask

FAQs on the exercise Associating User Actions

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in #get-help.

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head to #get-help and #community:tips-and-resources. If you are wanting feedback or inspiration for a project, check out #project.

Looking for motivation to keep learning? Join our wider discussions in #community

Learn more about how to use this guide.

Found a bug? Report it online, or post in #community:Codecademy-Bug-Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

I think there is a problem with this page. It doesn’t even look like the page was completed. What is on the browser frame doesn’t reflect what is in the code frame. The instructions don’t have any info on how to complete the task and the hint has no info either. It looks like whoever created this Skill-Path forgot to complete this page. Am I the first person to complete this Skill-Path? There has been issues with almost all of the lessons in this module. This is the only completely broken lesson I have come across though. It needs someone to look into it and fix it. I’ll be moving on but I feel like I’m going to miss an important part of this Path!


Totally. The rest of the course has errors but you can mostly figure it out.
This page has almost no content or useful instructions in it.


I tried this course a couple weeks ago and the whole section of accounts and authentication was completely broken right from the first lesson. It seems they partially fixed it as I was able to complete up until this section now.

Hopefully the can fix this track :frowning:

Yeah I have the same issue. Clicking ‘View Solution’ doesn’t even add any code but it lets you pass to the next step.

Yes, I also reached that part and it isn’t complete, it shows nothing about this part of the lesson

Videos from this cource on YouTube have 6 likes, so here we are, the 6 learners :slight_smile:

And yes, this page is still broken.

This lesson is still broken as of today.

Please fix!

Please can someone explain how the code restricts the user to getting only their own information?

Looking at the ‘user’ route, the ‘@login_required’ decorator means a log in is required.
in part 5 of the lesson it explains:

  • the @login_required decorator is used to protect the user route
  • the User table is queried for a user that matches the provided username
    However, there appears to be nothing to stop someone from passing a different user’s username to the route via the URL once they have logged in.

Secondly, it is not clear what this section of code does:

def load_user(user_id):
return User.query.get(int(user_id))

part 5 of the lesson explains:

  • the load_user() function loads a user with a given user_id

But we never see the load_user route referenced again. We are also are never shown how to access the user that has been loaded.

Hello Codecademy,

This part of the course seems to be incomplete?
Step5 & 6’s initial code is the same as what’s shown when clicking “give me the solution” - but even if you reset the exercise and then paste what was provided in the solution it doesn’t say you got it right.

Furthermore on step 6 when doing something wrong it simply says “Did you …?”
And in the Hint it simply says “See the lesson to view what a python decorator looks like”

Step7 (first part) already has the code implemented from scratch that the assignment tells you to write.
Very confusing instructions.

Not sure why the format of the exercises changed so drastically but the person who’s responsible for this part of the course needs to have a serious look over it to make it equivalent to the rest of your content.