Giter Site home page Giter Site logo

michaelfed68 / django-blog Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.45 MB

It is a Django site where you can read and create blogs and articles.

Home Page: https://incognito-b.up.railway.app

Python 72.60% Makefile 0.49% HTML 26.52% Procfile 0.02% Dockerfile 0.37%
python django blog project sites

django-blog's Introduction

“Incognito” Blog

Code style: black Imports: isort Django CI

Description

Hello! 👋 This app was created for educational purposes!

It is a blog where you can read and create blogs and articles. You can also follow interesting authors or blogs in your personal feed by subscribing to them!

All you have to do to try the full functionality of this project is to register on site!

Behind the scene:

  • Python (Django as the main framework)
  • PostgreSQL for data
  • Redis for caching, sessions and online system functionality
  • Yandex Cloud Object Storage (S3 API) for media and static files
  • Bootstrap 5 for a beautiful and fast-changing design

App on Railway:

Incognito blog

The same as Heroku

For developers

Requirements

  • Docker
  • Docker compose

If you want to install this project on your local machine manually, you need to do the following: Clone the repository and go to it:

git clone https://github.com/MichaelFed68/django-blog.git

cd django-blog

Now, you have to create .env.dev file and setup environment variables:

touch .env.dev

This is the minimum set of variables to start a project:

DEBUG='true'

SECRET_KEY='your generated secret key for django project'

For example:

from django.core.management.utils import get_random_secret_key

get_random_secret_key()

See Environment variables section.

When you have configured variables, run following docker compose commands:

docker compose build

docker compose up

Environment variables

This is a list of enviroment variables that are needed for the application to work correctly

ALLOWED_HOSTS

Values are specified as a string, separated by a space

By default set to '127.0.0.1 .localhost [::1]'

CSRF_TRUSTED_ORIGINS

Values are specified as a string, separated by a space

By default set to 'http://127.0.0.1'

SECRET_KEY

DEBUG

By default set to False

DATABASE_URL

postgresql://[user[:password]@][host][:port][/dbname]

REDIS_URL

redis://host:port


BASE_GROUP

By default set to 'base_members_of_site'

The name of the group that will be automatically created when the user first registers on the site. It will contain all the listed permissions from the PERMISSIONS_FOR_BASE_GROUP variable.

PERMISSIONS_FOR_BASE_GROUP

By default set to the following list: ["add_article", "change_article", "delete_article", "view_article", "add_blog", "view_blog", "view_language", "change_profile", "delete_profile", "view_profile"]

Contains a list of permissions that will be granted to newly registered users.


USER_ONLINE_TIMEOUT

By default set to 60 seconds

Time during which the user will be considered online

USER_LAST_SEEN_TIMEOUT

By default set to 86400 seconds (1 day)

Time during which the date of the last visit of the user will be stored in Redis


ENABLED_YANDEX_STORAGE

By default set to False

Whether or not Yandex cloud storage will be used. The app can use custom storage through the S3 API provided by Yandex cloud.

Read more in the documentation of Yandex storage if you want to use it

https://cloud.yandex.com/en/docs/storage/s3/

https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html

For more information, read django-storages docs also

YANDEX_OBJECT_STORAGE_BUCKET_NAME

Your backet name in Object Storage

YANDEX_S3_DOMAIN

f.e. '.s3.yandexcloud.net'

AWS_S3_ENDPOINT_URL

f.e. 'https://storage.yandexcloud.net'

AWS_S3_REGION_NAME

f.e. 'ru-central1-a'


ENABLED_EMAIL

Whether or not the actual mailing will be used.

By default set to False

Define to send a password reset email and error reporting:

Requires ENABLED_EMAIL='true'

SERVER_EMAIL

ADMINS

A tuple of all the people who get code error notifications

EMAIL_USE_TLS

EMAIL_PORT

EMAIL_HOST

EMAIL_HOST_USER

EMAIL_HOST_PASSWORD

Support

If you need help, please contact me via email:

[email protected]

django-blog's People

Contributors

mikhailfed68 avatar

Watchers

 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.