Search code examples
pythondjangodjango-modelsdjango-formspayment

How do I make a user pay before creating user account Django


Okay.. so I am trying to create a website where the user would have to pay before registration.

Any help please?? The question might be weird but I am actually a beginner


Solution

  • Here is what I think you can do. First make sure your registration form is the actually default django_auth model for user registration.

    The you can put in place measures that allow the user to be verified first that means you create a payment model within the application and as soon as the user pays up, a reference number of the payment is stored in the database and marked unused. So when the user is registering within the Django application that means you can provide a form field to verify the reference code from the payment.

    Its quite a long process that requires you to play around with the Django Configuration files and modify them. My best reference and recommendation though is that...

    Let the users register and restrict some of the functionality within the application for all unpaid users. That way you save yourself a lot of time.