I’m just starting out with Python for Google App Engine. I have a file notifications.py, and in here, I will be creating User entities, which are specified in users.py. How can I do this? I’ve tried import users, but I get an error: NameError: global name 'User' is not defined
I’m just starting out with Python for Google App Engine. I have a file
Share
Oh, I just had this problem too! After you do:
to get
Useryou have to typeusers.UserAlternatively you could import it like:
then reference it as just
Userbut if you do it this way you’ll have to list every bit from users that you want in the following format:If you’re feeling super lazy and you don’t want to type in any prefixes or list all the things you want, just type