Skip to main content

EasyVisitors

made-with-python PyPI - Python Version GitHub last commit PyPI version fury.io GitHub issues PyPI - Wheel PyPI license

EasyVisitors is a simple to use Django App that counts website visitors and displays them without any hassles. It uses cookies to keep a track of how many people visited you website and doesnot increments simply upon a refresh unlike other simple counters.

  • Easy to use
  • Easy to setup
  • Easy to configure
  • Easy to customize

Installation

Installation is same for virtualenv and non virtualenv (because it is that simple XD)

> pip install EasyVisitors

Configration

In settings.py of your django project -

INSTALLED_APPS = [
    ...
    'EasyVisitors',
    ...
]
MIDDLEWARE = [
    ...
    'EasyVisitors.middleware.VisitorCounterMiddleware',
    ...
]

Getting Started

It is a local counter so it is necessary to create some space for recording it's values in the database. But no worries all of it has been taken care off. You just have to run -

> python manage.py makemigrations EasyVisitors
> python manage.py migrate EasyVisitors

This will create a simple table to store the values of the counter in the database. This step is very important as without these migrations the app wont be able to run as it wont be able to store it's values and hence will show an error.

Using the app

This simple to configure app is also simple to use. To use the value of counter in your templates -

{{ request.visitors }}

And to use it anywhere else -

request.visitors

Customization

In settings.py of your django project you can customize some aspects of EasyVisitors app -

  1. EASY_COUNTER_VISITOR_ALIVE_TIME - It determines how long a visitor is concidered as a unit and after that time, that user is concidered as a new vsitor. Datatype : int
    Unit : seconds
    Default: 300
     
  2. EASY_COUNTER_IGNORED_PATHS - List comprising of all paths, which donot alter the state of the counter upon being visited.
    Datatype : list
    Default: ['/admin']
     
  3. EASY_COUNTER_RESET - Value for the counter to begin from upon next refresh of any page. If it has any value except None then the counter will stay at that value forever untill changed to None after which it begins counting from that value.
    Datatype : int
    Default: None
    OnChange : Counter stay at the changed value
     

Creator

Deekshant Wadhwa

License

MIT

Metadata

Release files for EasyVisitors 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for EasyVisitors 0.1.0
File Size Uploaded
EasyVisitors-0.1.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for EasyVisitors 0.1.0
File Interpreter ABI Platform
EasyVisitors-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / EasyVisitors-0.1.0.tar.gz

Download URL EasyVisitors-0.1.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3b9b7b1a98a00f129a5a0ac05628699420945355d493865a7f77c452d776599a
BLAKE2b-256 checksum
How to use checksums
50043d4ca5dd64c51c42af804c1494b0709998d6ea1df15caba5f9e516b7ead0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

Release files / EasyVisitors-0.1.0-py3-none-any.whl

Download URL EasyVisitors-0.1.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
804105ef7fff0fb62a432922bcb6d05714e8caa840a77d6b5a14a4be01cfd442
BLAKE2b-256 checksum
How to use checksums
47b2ce3c0ba52b7de354245cfe6151706d4dbc901d1292ba3cd7b47b4f995847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page