{"id":20541127,"url":"https://github.com/sonyacore/simple-flask-blog","last_synced_at":"2025-04-14T08:39:24.002Z","repository":{"id":59550555,"uuid":"535965797","full_name":"SonyaCore/simple-flask-blog","owner":"SonyaCore","description":"Simple flask blog ","archived":false,"fork":false,"pushed_at":"2022-10-13T21:15:00.000Z","size":130,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T22:11:48.153Z","etag":null,"topics":["blog","flask","html-css","jinja2","python","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SonyaCore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-13T05:02:15.000Z","updated_at":"2025-03-15T08:08:50.000Z","dependencies_parsed_at":"2023-01-20T05:31:39.598Z","dependency_job_id":null,"html_url":"https://github.com/SonyaCore/simple-flask-blog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonyaCore%2Fsimple-flask-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonyaCore%2Fsimple-flask-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonyaCore%2Fsimple-flask-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonyaCore%2Fsimple-flask-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SonyaCore","download_url":"https://codeload.github.com/SonyaCore/simple-flask-blog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248848197,"owners_count":21171323,"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":["blog","flask","html-css","jinja2","python","sqlalchemy"],"created_at":"2024-11-16T01:19:35.336Z","updated_at":"2025-04-14T08:39:23.799Z","avatar_url":"https://github.com/SonyaCore.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e Simple Flask Blog \n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nSimple Flask Blog is a blog written with flask \u0026 jinja \n\u003c/p\u003e\n\n\u003ch2\u003e\nSetup Project :\n\u003c/h2\u003e\n\n---\n\n\u003ch3\u003e\nUsing Dockerfile\n\u003c/h3\u003e\n\n\u003cp\u003e\nFirst of all fill all required ENV for Dockerfile\n\u003c/p\u003e\n\n```docker\nENV SECRET_KEY='YOUR SECRETKEY'\nENV SQLALCHEMY_DATABASE_URI='sqlite:///site.db'\n\nENV MAIL_SERVER='SMTP MAIL SERVER'\nENV SMTP_PORT='SMTP PORT'\n\nENV MAIL_USERNAME='SMTP USER'\nENV MAIL_PASSWORD='SMTP PASS'\n```\n\u003cp\u003e\nSave Dockerfile . then build image\n\u003c/p\u003e\n\n```sh\ndocker build -t flask-app:1.0 .\n```\n\u003cp\u003e\nNow run image :\n\u003c/p\u003e\n\n```sh\ndocker run -p 80:80 flask-app:1.0\n```\n\n---\n\n\u003ch3\u003e\nWithout Docker (Advanced Way)\n\u003c/h3\u003e\n\n\u003cp\u003e\nFirst you need to Create a VENV for the Project\nOpen a Terminal in Project Directory and use Below line to Create VENV:\n\u003c/p\u003e\n\u003cdiv dir=\"ltr\"\u003e\n\u003cpre\u003e\npython3 -m venv venv\n\u003c/pre\u003e\n\u003c/div\u003e\n\u003cp\u003e\nNow you have to Activate VENV\u003cbr\u003e\nFor Activating VENV use below line :\n\u003c/p\u003e\n\u003cb\u003e\nLinux/macOS:\n\u003c/b\u003e\n\u003cdiv dir=\"ltr\"\u003e\n\u003cpre\u003e\nsource venv/bin/activate\n\u003c/pre\u003e\n\u003c/div\u003e\n\u003cb\u003e\nWindows:\n\u003c/b\u003e\n\u003cdiv dir=\"ltr\"\u003e\n\u003cpre\u003e\nvenv/Scripts/activate.ps1\n\u003c/pre\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cp\u003e\nAfter Activating VENV you have to install \u003cstrong\u003erequirements.txt\u003c/strong\u003e\n\u003c/p\u003e\n\u003cdiv dir=\"ltr\"\u003e\n\u003cpre\u003e\npip3 install -r requirements.txt\n\u003c/pre\u003e\n\u003c/div\u003e\n\n\u003ch4\u003e\nSet Environment Variables:\n\u003c/h4\u003e\n\n```bash\nexport SECRET_KEY='Your Secret Key'\nexport SQLALCHEMY_DATABASE_URI='sqlite:///site.db'\nexport MAIL_SERVER='SMTP Server URL'\nexport SMTP_PORT='SMTP PORT'\nexport MAIL_USERNAME='SMTP USERNAME'\nexport MAIL_PASSWORD='SMTP PASSWORD'\n```\n\n\u003cb\u003e\nNote:\n\u003c/b\u003e\n\u003cp\u003e\n save above exports to .bashrc for holding the values to your default shell.\n\u003c/p\u003e\n\n\u003ch4\u003e\nInitial Database and admin user :\n\u003c/h4\u003e\n\n```python\npython3 dbinit.py\n```\n\n\u003cb\u003e\nNote:\n\u003c/b\u003e\n\u003cp\u003e\n  Before using above command make sure to edit \u003cstrong\u003edbinit.py\u003c/strong\u003e for changing blogname , navbar and admin information to your needs.\n\u003c/p\u003e\n\n\n\u003ch4\u003e\nRun Project :\n\u003c/h4\u003e\n\u003cp\u003e\nEnter this command in the terminal to run the project :\n\u003c/p\u003e\n\u003cdiv dir=\"ltr\"\u003e\n\u003cpre\u003e\npython3 -m flask run --port 80\n\u003c/pre\u003e\n\u003c/div\u003e\n\n\u003cp\u003e\nNow enter the given address in the URL bar of your browser:\n\u003c/p\u003e\n\u003cdiv dir=\"ltr\"\u003e\n\u003cpre\u003e\nhttp://127.0.0.1:80/\n\u003c/pre\u003e\n\u003c/div\u003e\n\n\u003cb\u003e\nNote:\n\u003c/b\u003e\n\u003cp\u003e\n  Default admin username and password are :\n\u003c/p\u003e\n\n```text\nEmail : admin@gmail.com  \nPassword : admin\n```\n\n---\n\n\u003ch2\u003e\nConfig Project :\n\u003c/h2\u003e\n\n\u003cp\u003e\n  Open \u003cstrong\u003eapp/config.py\u003c/strong\u003e with you desired editor.\n  \n  if you want to disallow anyone to register and write post change :\n \u003cdiv dir=\"ltr\"\u003e\n\u003cpre\u003e\nUSER_REGISTER = True\n\u003c/pre\u003e\n   to \u003cstrong\u003eFalse\u003c/strong\u003e.\n\u003c/p\u003e\n\n---\n\n\u003cp\u003e\u003cstrong\u003e This Project are still in development so i wrote a todo list to track the Progress\u003c/strong\u003e\u003c/p\u003e\n\n\u003ch3\u003e Todo List \u003c/h3\u003e\n\n- [x] Better Structure of Application\n- [x] Add Database to Application\n- [x] Add A Way To Create,Update,Delete Posts with Privileged User \n- [x] User Account , Profile Picture\n- [x] User Password Encryption (brcypt method used)\n- [ ] A Better Post Edit Section with Markdown or JS\n- [x] Code Refactoring \u0026 Cleaner Code\n- [x] Blueprints\n- [x] Custom Error Pages\n- [x] Cache Exeptions to Show Error Pages\n- [x] Dockerfile\n\n[contributors-shield]: https://img.shields.io/github/contributors/SonyaCore/simple-flask-blog?style=for-the-badge\n[contributors-url]: https://github.com/SonyaCore/simple-flask-blog/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/SonyaCore/simple-flask-blog?style=for-the-badge\n[forks-url]: https://github.com/SonyaCore/simple-flask-blog/network/members\n[stars-shield]: https://img.shields.io/github/stars/SonyaCore/simple-flask-blog?style=for-the-badge\n[stars-url]: https://github.com/SonyaCore/simple-flask-blog/stargazers\n[issues-shield]: https://img.shields.io/github/issues/SonyaCore/simple-flask-blog?style=for-the-badge\n[issues-url]: https://github.com/SonyaCore/simple-flask-blog/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonyacore%2Fsimple-flask-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonyacore%2Fsimple-flask-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonyacore%2Fsimple-flask-blog/lists"}