I have an App Engine web application (based on python) in which one I would like to offer a "Free" Version and a "Premium" one. I would like to charge a monthly fee to the users that want to use the Premium version of the app, blocking access to premium features to the free users, just as Grooveshark does.
Which is the best way to do this when you're using Google App Engine for developing? I mean, I know that Paypal let you to charge a monthly fee to users but, How can I restrict access between the two interfaces? I'm really lost in this field, Never made a "Paid Model Ap开发者_如何学Gop" before.
Authorization determines what your users are allowed to do in your application based on their roles/permissions.
Basically you would need the following things:
- A flag
membershipstatus that indicates if a user is Premium or not; this should be set after the payment - A
@is_premiumdecorator to check if, reading themembershipflag value , a given Web Handler can be called by the current user
Have a look to Web2py authorization, Django Auth or Tipfy acl extension for some pretty neat solutions.
加载中,请稍侯......
精彩评论