Skip to main content

A short description of your package

Project description

===== pollstats

Pollstats is a Django app which display the entire number of Voters, calculates the percentage of voters who took part in the online poll. This library is exclusively designed for a college project and may not have all the dynamic features.

Quick start

  1. Add "pollstats.apps.PollstatsConfig" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [ ... 'pollstats.apps.PollstatsConfig', ]

  2. Include the polls URLconf in your project urls.py like this:: path('pollstats/',include("pollstats.urls")),

  3. This library uses Django's default User Object and the data in it is accessed by using from django.contrib.auth.models import User

  4. This library strictly uses the following models to calculate the data:

    class Events(models.Model): event_name = models.CharField(max_length=200) event_code = models.CharField(max_length=20) referal_code = models.CharField(max_length=20) hosted_by = models.ForeignKey(User, default=1, on_delete=models.CASCADE) event_description = models.TextField() event_status = models.IntegerField(default=0) starting_date = models.DateField(default=None) ending_date = models.DateField(default=None)

    class Options(models.Model): option_name = models.CharField(max_length=100) count = models.IntegerField(default=0) event_code = models.CharField(max_length=200)

    class Transactions(models.Model): voter = models.ForeignKey(User, default=1, on_delete=models.CASCADE) voting_time = models.DateTimeField(auto_now_add=True) option_name = models.CharField(max_length=150) event_name = models.CharField(max_length=150)
    event_code = models.CharField(max_length=70) referal_code = models.CharField(max_length=70)

  5. Django admin can be used to insert the data in to Events table and also to insert initial data in to Options table with count as 0

  6. Then the count should be updated when a user votes/unvotes, the data in Transactions table must be inserted and deleted during the vote/unvote process

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

pollstats-0.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

pollstats-0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pollstats-0.2.tar.gz.

File metadata

  • Download URL: pollstats-0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.8

File hashes

Hashes for pollstats-0.2.tar.gz
Algorithm Hash digest
SHA256 80e4c5b224449373428aefc8888f6a6a8dc7bc1b7dfaaef7c2ce2462ae5a77a2
MD5 f77a7902914d72469be04db928335a0a
BLAKE2b-256 e575b04861c9f73976c08ae6e39e4fa5c31a52316a482b42c8ea53c1bb68cede

See more details on using hashes here.

File details

Details for the file pollstats-0.2-py3-none-any.whl.

File metadata

  • Download URL: pollstats-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.8

File hashes

Hashes for pollstats-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4c34a234a8b3c47ff6721de0b9d94f4f3c177771b2b4e1420863943d292f78ea
MD5 0ea34a8687d7e0724b0ffc53048cc3ad
BLAKE2b-256 41bc6c057d4438b5d5e2d4ab4d0441b5fbca906323559316fa5d453dfe7b2643

See more details on using hashes here.

Supported by

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