dimanche 19 juin 2016

sqlalchemy.exc.InvalidRequestError

Hello,

I need some help;
I'm trying to learn flask and to my help I have this.
In Part V I created the /login part of the website that uses OpenID.
When it's done, this is how it's supposed to work:

  1. You choose OpenID provider
  2. You get directed to the provider's page.
  3. You login.
  4. You get re-directed to /ìndex.

But this is what happens:
The first 2 steps works perfectly fine, then, after I login with my provider,
I get this error:

sqlalchemy.exc.InvalidRequestError:

When initializing mapper Mapper|User|user, expression 'Post' failed to locate a name ("name 'Post' is not defined"). If this is a class name, consider adding this relationship() to the class after both dependent classes have been defined.

Here's the source code for error page.
I can't create a snippet with this since I would go 17k chars over the limit :D

If anyone could troubleshoot/debug this that would be perfect.
Thanks in advice,
troffaholic

Aucun commentaire:

Enregistrer un commentaire