{"id":14972722,"url":"https://github.com/devmahmud/django-poll-app","last_synced_at":"2025-04-08T01:37:38.830Z","repository":{"id":41158461,"uuid":"166519885","full_name":"devmahmud/Django-Poll-App","owner":"devmahmud","description":"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.","archived":false,"fork":false,"pushed_at":"2024-10-08T06:51:21.000Z","size":2952,"stargazers_count":310,"open_issues_count":3,"forks_count":176,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-08T01:37:22.098Z","etag":null,"topics":["bootstrap4","django","django-application","django-project"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devmahmud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-19T07:38:25.000Z","updated_at":"2025-03-27T16:50:16.000Z","dependencies_parsed_at":"2022-07-14T08:32:13.699Z","dependency_job_id":"31344287-f2fd-4907-aa2d-dad2e1f03c63","html_url":"https://github.com/devmahmud/Django-Poll-App","commit_stats":{"total_commits":75,"total_committers":13,"mean_commits":5.769230769230769,"dds":0.6533333333333333,"last_synced_commit":"5a5062bd89090487e8e00321562f63bacc4d8833"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmahmud%2FDjango-Poll-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmahmud%2FDjango-Poll-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmahmud%2FDjango-Poll-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmahmud%2FDjango-Poll-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devmahmud","download_url":"https://codeload.github.com/devmahmud/Django-Poll-App/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761052,"owners_count":20991532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap4","django","django-application","django-project"],"created_at":"2024-09-24T13:47:25.673Z","updated_at":"2025-04-08T01:37:38.814Z","avatar_url":"https://github.com/devmahmud.png","language":"Python","readme":"# Django-Poll-App\n\nDjango 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.\n\n\u003ch1\u003eGetting Started\u003c/h1\u003e\n\u003cp\u003eThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\u003c/p\u003e\n\n\u003ch2\u003ePrerequisites\u003c/h2\u003e\n\u003ccode\u003epython== 3.5 or up and django==2.0 or up\u003c/code\u003e\n\n\u003ch2\u003eInstalling\u003c/h2\u003e\n\u003cpre\u003eopen terminal and type\u003c/pre\u003e\n\u003ccode\u003egit clone https://github.com/devmahmud/Django-poll-app.git\u003c/code\u003e\u003cbr\u003e\u003cbr\u003e\n\n\u003ch4\u003eor simply download using the url below\u003c/h4\u003e\n\u003ccode\u003ehttps://github.com/devmahmud/Django-poll-app.git\u003c/code\u003e\u003cbr\u003e\n\n\u003ch2\u003eTo migrate the database open terminal in project directory and type\u003c/h2\u003e\n\u003ccode\u003epython manage.py makemigrations\u003c/code\u003e\u003cbr\u003e\n\u003ccode\u003epython manage.py migrate\u003c/code\u003e\n\n\u003ch2\u003eTo use admin panel you need to create superuser using this command \u003c/h2\u003e\n\u003ccode\u003epython manage.py createsuperuser\u003c/code\u003e\n\n\u003ch2\u003eTo Create some dummy text data for your app follow the step below:\u003c/h2\u003e\n\u003ccode\u003epip install faker\u003c/code\u003e\n\u003ccode\u003epython manage.py shell\u003c/code\u003e\n\u003ccode\u003eimport seeder\u003c/code\u003e\n\u003ccode\u003eseeder.seed_all(30)\u003c/code\u003e\n\u003cp\u003eHere 30 is a number of entry. You can use it as your own\u003c/p\u003e\n\n## Configure Email - Poll Owner receives Email when vote is cast by user\n\n- Get your smtp host details and replace following values in your `settings.py`\n\n```text\n# Configure email settings\nEMAIL_HOST = '\u003cyour smtp host\u003e'\nEMAIL_PORT = '\u003csmtp port\u003e'\nEMAIL_HOST_USER = '\u003csmtp host user\u003e'\nEMAIL_HOST_PASSWORD = '\u003csmtp host pass\u003e'\nDEFAULT_FROM_EMAIL = '\u003cfrom email address\u003e'\n```\n## Getting an OpenAI API Key\n\n1. **Sign Up for an OpenAI Account:**\n   - Go to [OpenAI’s website](https://www.openai.com/) and sign up for an account if you don't have one.\n\n2. **Navigate to API Keys:**\n   - After logging in, go to the API section of your account by visiting [OpenAI API Keys](https://platform.openai.com/account/api-keys).\n\n3. **Create a New API Key:**\n   - Click on the \"Create new key\" button. A new API key will be generated for you.\n\n4. **Copy Your API Key:**\n   - Copy the API key to your clipboard. You will need this key to access OpenAI services.\n\n5. **Set Up Your Environment:**\n   - Add the API key to your environment variables. You can do this by setting an environment variable in your terminal or adding it to a `.env` file or add in settings.py . For example, you can set it in your `.env` file like this:\n     ```\n     OPENAI_API_KEY=your_api_key_here\n     ```\n\n\u003ch2\u003e Configuring OAuth login \u003c/h2\u003e\n\u003cdetails\u003e\n    \u003csummary\u003eObtaining OAuth Client ID for Google\u003c/summary\u003e\n\n\n1. **Go to the Google Cloud Console:**\n   - Navigate to [Google Cloud Console](https://console.cloud.google.com/).\n   - Sign in with your Google account.\n\n2. **Create a new project:**\n   - Click on the project dropdown menu at the top of the page.\n   - Click on \"New Project\" and follow the prompts to create a new project.\n\n3. **Enable the Google Identity service:**\n   - In the Google Cloud Console, navigate to \"APIs \u0026 Services\" \u003e \"Dashboard.\"\n   - Click on \"Enable APIs and Services.\"\n   - Search for \"Google Identity\" or \"Google+ API\" and enable it for your project.\n\n4. **Create OAuth consent screen:**\n   - In the Google Cloud Console, navigate to \"APIs \u0026 Services\" \u003e \"OAuth consent screen.\"\n   - Fill in the required fields (like application name, user support email, etc.).\n   - Add scopes (permissions) your application requires.\n   - Save the consent screen information.\n\n5. **Create OAuth credentials:**\n   - In the Google Cloud Console, navigate to \"APIs \u0026 Services\" \u003e \"Credentials.\"\n   - Click on \"Create Credentials\" \u003e \"OAuth client ID.\"\n   - Select \"Web application\" as the application type.\n   - Enter a name for your OAuth client.\n   - Add authorized redirect URIs : `http://127.0.0.1:8000/complete/google-oauth2/`\n   - Click \"Create.\"\n\n6. **Copy the client ID and client secret:**\n   - Once the OAuth client is created, you'll see your client ID and client secret.\n   - Copy these values and update the following variables in settings.py\n\n        ```\n        SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = 'your-client-id'\n        SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'your-client-secret'\n        ```\n\nFor detailed instructions, refer to Google's documentation on [OAuth 2.0](https://developers.google.com/identity/protocols/oauth2).\n\u003c/details\u003e\n\n\u003cdetails\u003e\n   \u003csummary\u003eObtaining OAuth Client ID for Facebook\u003c/summary\u003e\n   \n1. **Create a Facebook App:**\n   - Go to the [Facebook Developers](https://developers.facebook.com/) website and log in.\n   - Click on \"My Apps\" and then \"Create App\".\n   - Enter the required information for your app (display name, contact email, etc.) and create the app.\n\n2. **Configure Basic Settings:**\n   - In your app dashboard, go to Settings \u003e Basic.\n   - Add a platform (select Website) and enter your site URL(http://127.0.0.1:8000/complete/facebook/).\n   - Save your changes.\n\n3. **Get App ID and App Secret:**\n    \n    - Update the following settings to your settings file, replacing `'your-facebook-client-id'` and `'your-facebook-client-secret'` with your actual LinkedIn app credentials:\n     ```python\n        SOCIAL_AUTH_FACEBOOK_OAUTH2_KEY = 'your-client-id'\n        SOCIAL_AUTH_FACEBOOK_OAUTH2_SECRET = 'your-client-secret'\n     ```\n\n\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eObtaining OAuth Client ID for LinkedIn\u003c/summary\u003e\n\n  ### Step 1: Create a LinkedIn App\n  1. Go to the [LinkedIn Developer Portal](https://www.linkedin.com/developers/) and sign in.\n  2. Click on \"Create App\" and fill in the required details, such as the app name, description, and logo.\n  3. In the \"Authorized Redirect URLs\" section, add the callback URL for your Django app. This URL will be like `http://127.0.0.1:8000/complete/linkedin/`.\n  4. Save the changes and note down the Client ID and Client Secret provided by LinkedIn.\n\n  ### Step 2: Configure Django Settings\n  \n    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:\n     ```python\n     SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY = 'your-client-id'\n     SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET = 'your-client-secret'\n     ```\n\u003c/details\u003e\n\n\u003ch2\u003e To run the program in local server use the following command \u003c/h2\u003e\n\u003ccode\u003epython manage.py runserver\u003c/code\u003e\n\n\u003cp\u003eThen go to http://127.0.0.1:8000 in your browser\u003c/p\u003e\n\n\u003ch2\u003eProject snapshot\u003c/h2\u003e\n\u003ch3\u003eHome page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/19981097/51409444-0e40a600-1b8c-11e9-9ab0-27d759db8973.jpg\" width=\"100%\"\u003c/img\u003e \n\u003c/div\u003e\n\n\u003ch3\u003eLogin Page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/19981097/51409509-36c8a000-1b8c-11e9-845a-65b49262aa53.png\" width=\"100%\"\u003c/img\u003e \n\u003c/div\u003e\n\n\u003ch3\u003eRegistration Page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/19981097/51409562-5cee4000-1b8c-11e9-82f6-1aa2df159528.png\" width=\"100%\"\u003c/img\u003e \n\u003c/div\u003e\n\n\u003ch3\u003ePoll List Page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/19981097/51409728-d423d400-1b8c-11e9-8903-4c08ba64512e.png\" width=\"100%\"\u003c/img\u003e \n\u003c/div\u003e\n\n\u003ch3\u003ePoll Add Page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/19981097/51409796-fe759180-1b8c-11e9-941b-c1202956cca4.png\" width=\"100%\"\u003c/img\u003e \n\u003c/div\u003e\n\n\u003ch3\u003ePolling page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/19981097/51409843-1e0cba00-1b8d-11e9-9109-cceb79a6a623.png\" width=\"100%\"\u003c/img\u003e \n\u003c/div\u003e\n\n\u003ch3\u003ePoll Result Page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/19981097/51409932-60ce9200-1b8d-11e9-9c83-c59ba498ca8b.png\" width=\"100%\"\u003c/img\u003e \n\u003c/div\u003e\n\n\u003ch3\u003ePoll Edit Page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/19981097/51410008-92dff400-1b8d-11e9-8172-c228e4b60e28.png\" width=\"100%\"\u003c/img\u003e \n\u003c/div\u003e\n\n\u003ch3\u003eChoice Update Delete Page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/19981097/51410442-dc7d0e80-1b8e-11e9-8f8e-18e6d7bb70fb.png\" width=\"100%\"\u003c/img\u003e \n\u003c/div\u003e\n\n\u003ch3\u003eDsahboard Page\u003c/h3\u003e\n\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"100%\" alt=\"dashboard\" src=\"https://github.com/devmahmud/Django-Poll-App/assets/17628879/46bd5f4d-b236-44c4-8636-2e171e2173e5\"\u003e \n\u003c/div\u003e\n\n\u003ch2\u003eAuthor\u003c/h2\u003e\n\u003cblockquote\u003e\n  Mahmudul alam\u003cbr\u003e\n  Email: expelmahmud@gmail.com\n\u003c/blockquote\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ch3\u003e========Thank You !!!=========\u003c/h3\u003e\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmahmud%2Fdjango-poll-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevmahmud%2Fdjango-poll-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmahmud%2Fdjango-poll-app/lists"}