Search code examples
djangoaccount

djngo account register match with Users app


One of the two apps I created in my Django project is accounts and the other is Users. Accounts allows users to register, log in and log out. The Users app creates a user page using their information. How can I import the information of the user registered in the Accounts app to the app in Users?

how can I do some one if registered automatically create I new user in Users app how can I access this data


Solution

  • Yes you can import information of the user registered in the Accounts app into Users App. You do this by importing the model class i.e

    from accounts.models import Account
    #rest of code
    

    To automatically create a user page when one registers in the accounts app, you will may use django signals and make use of the post_save method to achieve what you are looking for.