What would be the best approach to implementing a paywall?

27 views
Skip to first unread message

Roy Shillingburg

unread,
Dec 12, 2017, 8:26:09 AM12/12/17
to Django users
Should I simply add a flag on each user model to check if subscribed and restrict access to certain views/apps?

A middleware approach?


Egor Smolyakov

unread,
Dec 12, 2017, 9:14:28 AM12/12/17
to django...@googlegroups.com
You can extend your User's model with a new option like
"is_subscribed" and check it via middleware or your mixin.
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f8450f67-3d32-4fc8-a630-8f9d648a4c56%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


--
Kind Regards, Egor Smolyakov.
Reply all
Reply to author
Forward
0 new messages