Settings — django-registrationwall 0.1 documentation

# Settings

The mixin tag offers three settings. By default, they are:

    REGWALL_LIMIT = 10

    REGWALL_EXPIRE = 30

    REGWALL_SOCIAL = [
        'google',
        'facebook',
        'twitter',
    ]

## `REGWALL_LIMIT`

An integer indicating the number of resources to display before the registration wall appears.

The mixin displays `10` resources by default.

## `REGWALL_EXPIRE`

An integer indicating the number of days before the consumed resources count is reset to zero.

The mixin resets after `30` days by default.

## `REGWALL_SOCIAL`

A list of strings of domains whose referral does not increment the consumed resources count. In other words, visitors coming from these domains are not penalized. Previously, the app used a rudimentary method of domain checking with the `urlparse`/`urllib.parse` modules. Because URLs vary so widely in construction, the app now uses the tldextract package to accurately extract the domain. Therefore, this setting should contain only domains and not top-level domains, e.g. `['google', 'facebook', 'twitter']` and not `['google.com', 'facebook.com', 'twitter.com']`.

The mixin allows referrals from Google, Facebook, and Twitter by default.