-
Notifications
You must be signed in to change notification settings - Fork 28
confused about extending file #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That is another case of documentation being missed. The way it works is:
the extended profile is a parallel table to the authentication table, and the user table actually allows multiple authentication methods to be associated with a single authentication id. This way, a user on your system could have a local auth and attach a Facebook auth to it. They would have two different ways to log into the same Auth ID. I've cleaned up the docs slightly, but, need to document things a little better as that was written before the main rewrite of Apex. |
so right now if I want to add the first name and last name fields I can do something like this? in models/init.py class ForeignKeyProfile(Base):
in project/models/profile.py class NewRegisterForm(RegisterForm): by the way ,under the "If you are using OpenID providers: section". why there is also what is the usage of the ExtendedProfile class in apex_example/models.py ? Thank you ! sorry to ask you so many questions. I'm a newbie |
shouldn't be AuthID = relationship(AuthID, backref=backref('profile', uselist=False)) rather than |
I need to remove one of those sections. The early version of Apex made the distinction between a locally created user and an OpenID created user. The one on the top of that page is the most accurate. project/profile.py and project/models/profile.py is a typo, it should be in models. openid_after(object): should be class openid_after(RegisterForm): You're sending an object through, not the form. However, the documentation is again out of date here. Here's a sample from some code using the current version of Apex.
user = relationship(AuthID, backref=backref('profile', uselist=False)) You are correct, overactive search and replace when fixing the docs. Leaving this open until I get a chance to fix the docs and update the example |
on the page http://www.thesoftwarestudio.com/apex/extending_profile.html
auth_user_profile.user_id references the AuthID.id when using a local authentication database, but auth_user_profile.user_id references AuthUser.id. when using OpenID providers.
is this correct? where they are different? can I have both ways to extend the profile at the same time? Thank you!
The text was updated successfully, but these errors were encountered: