Skip to content

Latest commit

 

History

History
187 lines (123 loc) · 5.14 KB

Reference.MD

File metadata and controls

187 lines (123 loc) · 5.14 KB

Django Technical Support

RabbitMQ

  1. Python Pika RabbitMQ 6 Implementation mode
  2. Docker Compose for RabbitMQ
  3. Deal with Threading Conflict in Django
  4. Execute RabbitMQ Listener When App Start

Install Plugins for MQTT

docker exec -it <RabbitMQ ContainerID Or Container Name> rabbitmq-plugins enable rabbitmq_mqtt
docker exec -it <RabbitMQ ContainerID Or Container Name> rabbitmq-plugins enable rabbitmq_web_mqtt
docker exec -it <RabbitMQ ContainerID Or Container Name> rabbitmq-plugins enable rabbitmq_web_stomp

Install RabbitMQ Management

docker exec <RabbitMQ ContainerID Or Container Name> rabbitmq-plugins enable rabbitmq_management

Check RabbitMQ current plugins

docker exec <RabbitMQ ContainerID Or Container Name> rabbitmq-plugins list

Celery

Test Info

Celery -A PetMonitoringSystemBackend worker -l info

Django

  1. Django 6 Way to implement API
  2. Docker Container Django
  3. Forest Admin Django

Django Health Check

  1. Django Health RabbitMQ Redis

Django Redis

  1. Django-Redis Cache

Django Logging

  1. Django Logstash push logging to Kibana
  2. Python Logger
  3. Python Logging Handler
  4. Python Logger Produce Log File

Django Websocket

  1. Channels Chatroom
  2. Django Websockets: A Complete Beginners Guide!

Django GraphQL

Install Dependencies

pipenv install django-graphene
  1. django-graphene unittest
  2. graphene unittest
  3. django-graphene setup

Django Grafana Prometheus

  1. Implement Grafana Prometheus on Django

Install Dependencies

pipenv install django-prometheus

Inject in Global Environment

INSTALLED_APPS = [
    'django_prometheus',
]
MIDDLEWARE= [
    
]
MIDDLEWARE.insert(0, 'django_prometheus.middleware.PrometheusBeforeMiddleware')
MIDDLEWARE += [
    'django_prometheus.middleware.PrometheusAfterMiddleware',
]

Register Route in urls.py

# PetMonitoringSystemBackend/urls.py
from django.urls import path, include
from django_prometheus import urls as prometheus_urls
urlpatterns = [
    path('metrics/', include(prometheus_urls))
]

Django Migration and Seed

  1. Seeding and Migration through Django-Seed

Django Image Upload

  1. Uploading Images to Django REST Framework from Forms in React

Django Forest Admin

Install Dependencies

pipenv install django-forestadmin

Inject in Global Environment

INSTALLED_APPS = [
    "django_forest"
]

Register Route in urls.py

# PetMonitoringSystemBackend/urls.py
from django.urls import path, include
urlpatterns = [
      path('forest/', include('django_forest.urls')),
]

Init Forest Admin

# PetMonitoringSystemBackend/wsgi.py
from django_forest import init_forest
init_forest()

GitHub Actions

  1. GitHub Actions Push to Docker Hub

Daphne

  1. Daphne Django Static file missing
  2. Django Deploy through Daphne

Ubuntu

  1. Install Python3 in Ubuntu

SonarQube

  1. Fix Container Hosting maximum memory problem

Firebase

Note: FCM V1 not support post request directly should pass OAuth 2.0 Authentication

  1. FCM V1 through OAuth 2.0