Django poll app is a full featured polling app. You have to register in this app to show the polls and to vote. If you already voted you can not vote again. Only the owner of a poll can add poll , edit poll, update poll, delete poll , add choice, update choice, delete choice and end a poll. If a poll is ended it can not be voted. Ended poll only shows user the final result of the poll. There is a search option for polls. Also user can filter polls by name, publish date, and by number of voted. Pagination will work even after applying filter.
MIT License
Django poll app is a full featured polling app. You have to register in this app to show the polls and to vote. If you already voted you can not vote again. Only the owner of a poll can add poll , edit poll, update poll, delete poll , add choice, update choice, delete choice and end a poll. If a poll is ended it can not be voted. Ended poll only shows user the final result of the poll. There is a search option for polls. Also user can filter polls by name, publish date, and by number of voted. Pagination will work even after applying filter.
settings.py
# Configure email settings
EMAIL_HOST = '<your smtp host>'
EMAIL_PORT = '<smtp port>'
EMAIL_HOST_USER = '<smtp host user>'
EMAIL_HOST_PASSWORD = '<smtp host pass>'
DEFAULT_FROM_EMAIL = '<from email address>'
Sign Up for an OpenAI Account:
Navigate to API Keys:
Create a New API Key:
Copy Your API Key:
Set Up Your Environment:
.env
file or add in settings.py . For example, you can set it in your .env
file like this:
OPENAI_API_KEY=your_api_key_here
Go to the Google Cloud Console:
Create a new project:
Enable the Google Identity service:
Create OAuth consent screen:
Create OAuth credentials:
http://127.0.0.1:8000/complete/google-oauth2/
Copy the client ID and client secret:
Once the OAuth client is created, you'll see your client ID and client secret.
Copy these values and update the following variables in settings.py
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = 'your-client-id'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'your-client-secret'
For detailed instructions, refer to Google's documentation on OAuth 2.0.
Create a Facebook App:
Configure Basic Settings:
Get App ID and App Secret:
'your-facebook-client-id'
and 'your-facebook-client-secret'
with your actual LinkedIn app credentials: SOCIAL_AUTH_FACEBOOK_OAUTH2_KEY = 'your-client-id'
SOCIAL_AUTH_FACEBOOK_OAUTH2_SECRET = 'your-client-secret'
http://127.0.0.1:8000/complete/linkedin/
.1. Update the following settings to your settings file, replacing `'your-linkedin-client-id'` and `'your-linkedin-client-secret'` with your actual LinkedIn app credentials:
```python
SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY = 'your-client-id'
SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET = 'your-client-secret'
```