Skip to content

richardcornish/django-registrationwall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Registration Wall

PyPI version Build status

https://raw.githubusercontent.com/richardcornish/django-registrationwall/master/docs/_static/img/regwall-detail.png

Django Registration Wall is a Django mixin application that limits an anonymous user's access to content, after which the user is redirected to the login URL. The behavior is modeled after the common paywall scenario.

Fake news articles credit goes to The Onion.

Install

$ pip install django-registrationwall

Add to settings.py.

INSTALLED_APPS = [
    # ...
    'regwall',
]

Add to one of your views.py.

from django.views.generic import DetailView

from regwall.mixins import RaiseRegWallMixin

from .models import Article


class ArticleDetailView(RaiseRegWallMixin, DetailView):
    model = Article

About

A Django mixin to raise a metered registration wall

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published