Skip to main content

A Django mixin application to raise a registration or paywall

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-registrationwall-0.1.0.tar.gz (3.3 MB view details)

Uploaded Source

File details

Details for the file django-registrationwall-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-registrationwall-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d6748a71b598a62840c1ac57548f6b266cac089cdaffe6b1ac4bf8ac8bad3e64
MD5 640610c101553c856d13c2f631e2ecd1
BLAKE2b-256 c484c574e3f7e6d1615bba6aef48265cf9d4b1421bb614f9a13afb525d170f02

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page