0
votes
15
views
How to create Django Language Middleware
posted at March 21, 2020, 1:01 p.m. - 1 week ago

This example below to setup default language code as id (Indonesian). Your file middleware.py # -*- coding: utf-8 -*- from django.conf import settings from django.utils import translation from django.utils.deprecation import …

0
votes
90
views
Change backend gmail to Postmarkapp for Django
posted at July 12, 2018, 10:13 p.m. - 1 year, 8 months ago

1. Install module of Python Postmark Install this module manually from souce inside your environtment: https://github.com/themartorana/python-postmark If you work on Django==1.9.*, requirements only mock. 2. Register and Put the Server …

email api settings django module
0
votes
88
views
Django: Redirect HTTP to HTTPS
posted at July 12, 2018, 10:13 p.m. - 1 year, 8 months ago

Django: Redirect HTTP to HTTPS, basically the Django already support to handle this redirection at https://docs.djangoproject.com/en/dev/topics/security/#ssl-https Edit in your settings.py # Redirecting from `HTTP` to `HTTPS` for Django 1.8 or …

0
votes
105
views
How to implement the ForeignKey for multi databases Django
posted at July 12, 2018, 10:13 p.m. - 1 year, 8 months ago

Previously i had confused how to handle this problem, this problem also already asked by someone on stackoverflow (Cross Database foreign key error) and has the best answered by someone …

0
votes
92
views
Step by step how to use multiple databases with database routers in Django
posted at July 12, 2018, 10:13 p.m. - 1 year, 8 months ago

1. Please create a new superuser for the second/default/current database. Because you will getting this issue that i already asked before: https://gitter.im/django/django?at=5810b0b5806316005dc11f46 i use multiple site, multiple env, multiple project, …

0
votes
95
views
Fixed CommandError: Unable to find a locale path to store translations for file __init__.py
posted at July 12, 2018, 10:13 p.m. - 1 year, 8 months ago

Hello guys, this day I want to share a simply tutorial how to fix CommandError: Unable to find a locale path to store translations for file <app_name>/__init__.py for Django 1.10 …