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
-
Add "pollstats.apps.PollstatsConfig" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [ ... 'pollstats.apps.PollstatsConfig', ]
-
Include the polls URLconf in your project urls.py like this:: path('pollstats/',include("pollstats.urls")),
-
This library uses Django's default User Object and the data in it is accessed by using from django.contrib.auth.models import User
-
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) -
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
-
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
Built Distribution
File details
Details for the file pollstats-0.6.tar.gz
.
File metadata
- Download URL: pollstats-0.6.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3340910a49267a162965a715cc9fb9d9a8cc08f7f9d8bc77b82b746dcff9e326 |
|
MD5 | 3b71f9fa4b73b5d08e33825cf1d1effc |
|
BLAKE2b-256 | 717898978bc8d1cf1b29e187302695b319b5fec9153d3869da4e2798df83727a |
File details
Details for the file pollstats-0.6-py3-none-any.whl
.
File metadata
- Download URL: pollstats-0.6-py3-none-any.whl
- Upload date:
- Size: 5.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0d3cacab6634968902f54610e57cf37d3d2dd5aa7ed909bae186f5f5cc1fb1c |
|
MD5 | 3cab44c9eb3e6a75f612308e3cb48d4a |
|
BLAKE2b-256 | d8f6902d0fa577f787344617867a3c0be4f46c5257e178ee0cae973f0fbe4a7c |