Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Build a Social Network with Flask Making Strong Users The User Model

unresolved refference 'datetime'

Hey everyone, when i'm doing the joined_at i'm getting an unresolved reference 'datetime' why?

2 Answers

Steven Parker
Steven Parker
218,707 Points

Did you import datetime ?

Otherwise, it would help to see your code, or better yet, make a snapshot of the workspace and provide the link to it.

it's probably because i'm doing this locally but it worked :)

Kyle Salisbury
Kyle Salisbury
Full Stack JavaScript Techdegree Student 16,347 Points

I was trying the same thing on PyCharm and it took me a second to figure it out. You have to first install datetime. Then you must import datetime from datetime. That was my problem at least.