Code Monkey home page Code Monkey logo

devmahmud / djangoblog Goto Github PK

View Code? Open in Web Editor NEW
31.0 2.0 9.0 672 KB

Django blog is a beginner friendly blog application. This project illustrate Django Class Based views, How to use django models with custom model manager, how to use custom template tags, django Forms and model form, how to send mail with django, how to add rss syndication, and generate sitemap and unit test for model, view, form and template tags.

License: MIT License

Python 67.45% CSS 0.18% HTML 32.37%
django-application django-blog django-project django-templatetags django-for-beginners django-bootstrap4 django-testing

djangoblog's Introduction

Django-Blog

Django blog is a beginner friendly blog application. This project illustrate Django Class Based views, How to use django models with custom model manager, how to use custom template tags, django Forms and model form, how to send mail with django, how to add rss syndication, 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.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

open terminal and type
git clone https://github.com/devmahmud/DjangoBlog.git

or simply download using the url below

https://github.com/devmahmud/DjangoBlog.git

Requirements

Create a virtual environment and active it
and install requirements type:

pip install -r requirements.txt

In this project i have used postgres as a database, change db information in settings with your database information

To migrate the database open terminal in project directory and type

python manage.py makemigrations
python manage.py migrate

Static files collection

python manage.py collectstatic

Creating Superuser

python manage.py createsuperuser

Creating Dummy data using faker

python manage.py seed --posts number_of_post
example: python manage.py seed --posts 50

For sharing post with email change the email configuration

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your email'
EMAIL_HOST_PASSWORD = 'your email password'

To run the program in local server use the following command

python manage.py runserver
Then go to http://127.0.0.1:8000 in your browser

To test the project

python manage.py test

To test the project and pep8 style guide

python manage.py test && flake8

or you can simple run flake8

Project snapshot

Home Page

image

Detail Page

image

Comment Page

image

Post share page

image

Author

  Mahmudul alam
  Email: [email protected]

========Thank You !!!=========

djangoblog's People

Contributors

dependabot[bot] avatar devmahmud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.