|
1 |
| -# DjangoBlog |
2 |
| - |
| 1 | +## Django-Blog |
| 2 | +Django blog is a beginner friendly blog application. This project illustrate Django Class Based views, How to use django models with custom |
| 3 | +model manager, how to use custom template tags, django Forms and model form, how to send mail with django, how to add rss syndication, |
| 4 | +and generate sitemap and unit test for model, view, form and template tags and also how to seed database with Factory Boy, Faker and management commands. |
| 5 | + |
| 6 | +## Getting Started |
| 7 | +These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. |
| 8 | + |
| 9 | +## Installing |
| 10 | +``` |
| 11 | +open terminal and type |
| 12 | +git clone https://github.com/devmahmud/DjangoBlog.git |
| 13 | +``` |
| 14 | + |
| 15 | +#### or simply download using the url below |
| 16 | +``` |
| 17 | +https://github.com/devmahmud/DjangoBlog.git |
| 18 | +``` |
| 19 | + |
| 20 | +## Requirements |
| 21 | +``` |
| 22 | +Create a virtual environment and active it |
| 23 | +and install requirements type: |
| 24 | +
|
| 25 | +pip install -r requirements.txt |
| 26 | +``` |
| 27 | + |
| 28 | +### In this project i have used postgres as a database, change db information in settings with your database information |
| 29 | +## To migrate the database open terminal in project directory and type |
| 30 | +``` |
| 31 | +python manage.py makemigrations |
| 32 | +python manage.py migrate |
| 33 | +``` |
| 34 | + |
| 35 | +## Static files collection |
| 36 | +``` |
| 37 | +python manage.py collectstatic |
| 38 | +``` |
| 39 | + |
| 40 | +## Creating Superuser |
| 41 | +``` |
| 42 | +python manage.py createsuperuser |
| 43 | +``` |
| 44 | + |
| 45 | +## Creating Dummy data using faker |
| 46 | +``` |
| 47 | +python manage.py seed --posts number_of_post |
| 48 | +example: python manage.py seed --posts 50 |
| 49 | +``` |
| 50 | + |
| 51 | +## For sharing post with email change the email configuration |
| 52 | +``` |
| 53 | +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' |
| 54 | +EMAIL_HOST = 'smtp.gmail.com' |
| 55 | +EMAIL_PORT = 587 |
| 56 | +EMAIL_USE_TLS = True |
| 57 | +EMAIL_HOST_USER = 'your email' |
| 58 | +EMAIL_HOST_PASSWORD = 'your email password' |
| 59 | +``` |
| 60 | + |
| 61 | +## To run the program in local server use the following command |
| 62 | +``` |
| 63 | +python manage.py runserver |
| 64 | +Then go to http://127.0.0.1:8000 in your browser |
| 65 | +``` |
| 66 | + |
| 67 | +## To test the project |
| 68 | +``` |
| 69 | +python manage.py test |
| 70 | +``` |
| 71 | + |
| 72 | +## To test the project and pep8 style guide |
| 73 | +``` |
| 74 | +python manage.py test && flake8 |
| 75 | +``` |
| 76 | +or you can simple run `flake8` |
| 77 | + |
| 78 | + |
| 79 | +## Project snapshot |
| 80 | + |
| 81 | +### Home Page |
| 82 | + |
| 83 | + |
| 84 | +### Detail Page |
| 85 | + |
| 86 | + |
| 87 | +### Comment Page |
| 88 | + |
| 89 | + |
| 90 | +### Post share page |
| 91 | + |
| 92 | + |
| 93 | +## Author |
| 94 | +``` |
| 95 | + Mahmudul alam |
| 96 | + Email: expelmahmud@gmail.com |
| 97 | +``` |
| 98 | + |
| 99 | +<div align="center"> |
| 100 | + <h3>========Thank You !!!=========</h3> |
| 101 | +</div> |
| 102 | + |
0 commit comments