{"id":20074044,"url":"https://github.com/matheussc017/blognews","last_synced_at":"2026-04-17T11:32:20.807Z","repository":{"id":39726978,"uuid":"498515500","full_name":"MatheusSC017/BlogNews","owner":"MatheusSC017","description":"In this project, I've developed a dynamic Blog website that caters to both creators and readers of blog posts. Here are some key features and highlights: User-Friendly interface, Search Functionality, Newsletter System, Security with Recaptcha, OAuth Integration, Unit Testing and Docker","archived":false,"fork":false,"pushed_at":"2025-02-22T15:04:53.000Z","size":4801,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-02T02:44:42.514Z","etag":null,"topics":["django","docker","docker-compose","oauth","python"],"latest_commit_sha":null,"homepage":"https://blognews-a92f5c73f7ee.herokuapp.com/","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/MatheusSC017.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":"2022-05-31T22:24:10.000Z","updated_at":"2025-02-22T15:04:57.000Z","dependencies_parsed_at":"2024-11-13T14:50:14.555Z","dependency_job_id":"ac4b4513-47ce-4dad-b90f-6a0acfae8438","html_url":"https://github.com/MatheusSC017/BlogNews","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MatheusSC017/BlogNews","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatheusSC017%2FBlogNews","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatheusSC017%2FBlogNews/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatheusSC017%2FBlogNews/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatheusSC017%2FBlogNews/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatheusSC017","download_url":"https://codeload.github.com/MatheusSC017/BlogNews/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatheusSC017%2FBlogNews/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31927782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T10:35:34.458Z","status":"ssl_error","status_checked_at":"2026-04-17T10:35:09.472Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["django","docker","docker-compose","oauth","python"],"created_at":"2024-11-13T14:49:12.408Z","updated_at":"2026-04-17T11:32:20.785Z","avatar_url":"https://github.com/MatheusSC017.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BlogNews\n\n![Linguagem mais usada](https://img.shields.io/github/languages/top/MatheusSC017/BlogNews)\n![Numero de lingaugens usadas](https://img.shields.io/github/languages/count/MatheusSC017/BlogNews)\n![Lincense](https://img.shields.io/github/license/MatheusSC017/BlogNews)\n![Tamanho do projeto](https://img.shields.io/github/languages/code-size/MatheusSC017/BlogNews)\n\nThis project was designed with the aim of learning through the application of most of the techniques and functions provided by Django, such as models, views, templates, forms, etc. In addition to testing in practice the knowledge needed to adapt the classes provided by Django or create my own classes.\n\nAccess the website through this [link](https://blognews-a92f5c73f7ee.herokuapp.com/) (Link temporarily disabled)\n\n## Requirements\n![Python 3.9](https://img.shields.io/badge/python-3.9-blue?logo=python)\n![Python 3.9](https://img.shields.io/badge/MySQL--gray?logo=mysql\u0026logoColor=white)\n\n\n* **Python 3.9**\n* **MySQL**\n\n## Installation\n\n### Quick install with Docker\n#### Installation for Development mode\n1. Clone the repository on your device\n\n2. Move to the project repository\n\n3. Create a .env.dev file with the website configuration, for development purposes you can use the example below:\n~~~\nSECRET_KEY=secret_key_for_use_in_docker_change_me\nDEBUG=1\nDJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]\nDJANGO_CSRF_TRUSTED_ORIGINS=http://localhost:1337 http://127.0.0.1:1337\n\nEMAIL_BACKEND=django.core.mail.backends.dummy.EmailBackend\nEMAIL_HOST=''\nEMAIL_HOST_USER=''\nEMAIL_HOST_PASSWORD=''\nEMAIL_PORT=587\nEMAIL_USE_TLS=True\nDEFAULT_FROM_EMAIL='BlogNews'\n\nRECAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI\nRECAPTCHA_SECRET_KEY=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe\nRECAPTCHA_SITE_KEY_TEST=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI\nRECAPTCHA_SECRET_KEY_TEST=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe\n\nSQL_ENGINE=django.db.backends.mysql\nSQL_DATABASE=blog_database\nSQL_USER=blog_database_user\nSQL_PASSWORD=blog_database_password\nSQL_HOST=db\nSQL_PORT=3306\n\nDATABASE=mysql\nINITIAL_DATA=True\n\nSOCIALACCOUNT='{\n\t\"google\": {\n\t\t\"APP\": {\n\t\t\t\"client_id\": \"\",\n\t\t\t\"secret\": \"\",\n\t\t\t\"key\": \"\"\n\t\t}\n\t}\n}'\n~~~\n\n4. Run the docker compose file to install the application in development mode, in this form, the basic settings have already been set and some initial data will be generated for you to test the site\n\u003e docker-compose up -d --build \n\n#### Installation for Production mode\n1. Clone the repository on your device\n\n2. Move to the project repository\n\n3. Create a .env.prod and a .env.prod.db file with the website configuration, These are the fields you need to fill in, some fields are already set in the example:\n\n.env.prod\n``` \n# Django config\nSECRET_KEY=\nDEBUG=0\nDJANGO_ALLOWED_HOSTS=\nDJANGO_CSRF_TRUSTED_ORIGINS=\n\n# E-mail config\nEMAIL_BACKEND=\nEMAIL_HOST=\nEMAIL_HOST_USER=\nEMAIL_HOST_PASSWORD=\nEMAIL_PORT=\nEMAIL_USE_TLS=\nDEFAULT_FROM_EMAIL=\n\n# Google Recaptcha config\nRECAPTCHA_SITE_KEY=\nRECAPTCHA_SECRET_KEY=\nRECAPTCHA_SITE_KEY_TEST=\nRECAPTCHA_SECRET_KEY_TEST=\n\n# Oauth\nSOCIALACCOUNT='{\n\t\"google\": {\n\t\t\"APP\": {\n\t\t\t\"client_id\": \"\",\n\t\t\t\"secret\": \"\",\n\t\t\t\"key\": \"\"\n\t\t}\n\t}\n}'\n\n# Database config\nSQL_ENGINE=django.db.backends.mysql\nSQL_DATABASE=\nSQL_USER=\nSQL_PASSWORD=\nSQL_HOST=\nSQL_PORT=\n\n# Entrypoint config\nDATABASE=mysql\nINITIAL_DATA=False\n```\n\n.env.prod.db\n```\nMYSQL_USER: \nMYSQL_PASSWORD: \nMYSQL_ROOT_PASSWORD: \nMYSQL_DATABASE: \nMYSQL_DATABASE_HOST: \nMYSQL_DATABASE_PORT: \n```\n\n4. Run the docker compose file to install the application in production mode.\n\u003e docker-compose -f docker-compose.prod.yml up -d --build\n\n\u003e docker-compose -f docker-compose.prod.yml exec web python manage.py migrate --noinput\n\n*observation: If the error occurs that the docker image does not find the \"entrypoint.sh\" file, use programs such as Notepad++ to make sure that the \"entrypoint.sh\" file has the bytecode for carriage return (end-of-line markers) set to LF.*\n\n### On-premises installation\n1. Clone the repository on your device\n\n2. Create a virtual environment on your device\n\u003e python -m venv venv\n\n3. Install the libraries saved in the requirements.txt file, if you are using the PIP package manager you can use the following command\n\u003e pip install -r requirements.txt\n\n4. The last step is to configure the settings, for this change the Blog/blognews/settings.py file or create a local_settings.py file in the same directories, defining the following parameters\n\nSet the secret key\n~~~python\nSECRET_KEY = 'SITE_SECRET_KEY'\n~~~\n\nConfigure email settings for sending the newsletter\n~~~python\nEMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'\nEMAIL_HOST = 'HOST'\nEMAIL_HOST_USER = 'USER'\nEMAIL_HOST_PASSWORD = 'PASSOWORD'\nEMAIL_PORT = 9999\nEMAIL_USE_TLS = True\nDEFAULT_FROM_EMAIL = 'BLOGNEWS'\n~~~\n\nEnter your recaptcha keys or use the test keys provided by Google (SITE_KEY_GOOGLE: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI, SECRET_KEY_GOOGLE: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe, for more information visit [Google Recaptcha](https://developers.google.com/recaptcha/docs/faq)\n~~~python\nRECAPTCHA_SITE_KEY = 'RECAPTCHA_SITE_KEY'\nRECAPTCHA_SECRET_KEY = 'RECAPTCHA_SECRET_KEY'\n~~~\n\nConfigure the providers that will be used for login, follow the example below for the Google provider, where you must inform the client_id, secret and key\n~~~python\nSOCIALACCOUNT_PROVIDERS = {\n    'google': {\n        'APP': {\n            'client_id': 'CLIENT_ID',\n            'secret': 'SECRET',\n            'key': 'KEY'\n        }\n    }\n}\n~~~\n \nFinally configure the connection to the database\n~~~python\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.mysql',\n        'NAME': 'blog_database',\n        'HOST': '',\n        'USER': '',\n        'PASSWORD': '',\n        'PORT': '',\n    }\n}\n~~~\n\n### Google Oauth\nTo access this resource you will need to create your access in the credentials tab through the [Google APIs console](https://console.cloud.google.com/apis/). Remember to register the following parameters for the functionality to work.\n\n- Authorized JavaScript sources: http://127.0.0.1:8000\n- Authorized redirect URIs: http://127.0.0.1:8000/contas/google/login/callback/\n\nThis example is based on the fact that you are running the localmeste project, if you perform the deployment, replace the base URL with the name of your domain\n\n## Structure\n\n### Site division\n\nThe BlogNews website is divided into three parts:\n\n1. **General area**: Available to the general public, it is not mandatory for the user to be logged in, but still with some limitations to specific services, such as comments and searches.\n2. **Area for content creators**: This is an area intended for users marked as content creators, where pages are available for creating, editing, deleting and viewing their own Posts, albums or searches.\n3. **Administrative area**: This is an area for users with broad powers, where users can have deeper access to the system according to the permissions granted to them by a **SuperUser**.\n\n### Types of users\n\nBlogNews users can be broadly divided into 4 groups:\n\n1. **End users**: They are those who do not have permission to create content, therefore, they are limited to only viewing existing information, making comments or complaints and changing their own account information.\n2. **Content creators**: They have all the privileges of end users, in addition to being able to create and publish their own Posts, albums and surveys.\n3. **Staff members**: They are those who have access to the administrative area, but they are limited to the permissions granted to them by Super Users. Therefore, if he has permission, he can view all the system's content, whether published or not, and make changes or deletions as he deems necessary.\n4. **Superusers**: It is the highest level of the system, being able to grant permissions to itself and other users to administer the system.\n\n![Index](Documentation/Blognews.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheussc017%2Fblognews","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatheussc017%2Fblognews","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheussc017%2Fblognews/lists"}