From the course: Building a Paid Membership Site with Django

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Release plans

Release plans

From the course: Building a Paid Membership Site with Django

Start my 1-month free trial

Release plans

- [Instructor] Our site has a big problem. - [Instructor] Our site has a big problem. People who have paid for content People who have paid for content are not able to see it. are not able to see it. So let's go ahead and make a fix for that. So let's go ahead and make a fix for that. So here inside of our Plan function, So here inside of our Plan function, if a plan is premium, right now we're just if a plan is premium, right now we're just automatically redirecting them back to the join page. automatically redirecting them back to the join page. Instead, let's check and see first Instead, let's check and see first if a user is logged in, and if they are logged in, if a user is logged in, and if they are logged in, let's see if they have a membership. let's see if they have a membership. So first we're going to say if request.user.is_authenticated, So first we're going to say if request.user.is_authenticated, so if they are logged in, so if they are logged in, then we want to try and…

Contents