ytyng.com

Latest Articles

Page 5
Django
2022-10-17 11:24 (3 years ago)

Here is the code to create a password reset URL using Django all_auth.

2022-10-10 01:47 (3 years ago)

Here is a template code for creating a simple HTML application using Bottle.

Python
2022-10-09 02:16 (3 years ago)

Here is a memo on the code for creating a logger, which is used when making a simple daemon app in Python.

2022-09-30 00:50 (3 years ago)

When you open Slack on the web, the URL becomes:

Python
2022-09-19 07:31 (3 years ago)

When trying to output directory names on a Mac, there are instances where diacritic marks (like dakuten) appear as separate characters. This issue arises due to differences between Unicode normalization forms NFC and NFD. It can be fixed using unicodedata.normalize.

Django
2022-09-16 10:11 (3 years ago)

The migration for the `oauth2_provider` app included in Django's `django-oauth-toolkit` failed at migration 0004. The issue was resolved by manually removing the foreign key, changing the integer field to a bigint, and then reapplying the foreign key.

Django
2022-09-12 12:21 (3 years ago)

Summary of the blog post in English: "Django Logging Configuration: Output to Console Instead of File"

DjangoMySQL
2022-09-11 09:58 (3 years ago)

Here is a summary of the blog article in English: "When issuing raw SQL in Django, an error '2027 Malformed packet' may occur with certain SQL statements. A helpful solution is to avoid using double quotations."

nginx
2022-09-09 07:37 (3 years ago)

A simple setup to launch Nginx using Docker to host basic static files.

2022-09-09 05:32 (3 years ago)

When running Re:dash with Docker, a migration is necessary when upgrading from version 6 to version 7. This article outlines the migration process.

2022-09-08 00:44 (3 years ago)

Here's an overview in English: Introducing a method to analyze Apache access logs using GoAccess on Docker as an alternative to tools like Analog and Webalizer.

Python
2022-09-05 00:49 (3 years ago)

When attempting to create a Python 3.10 environment using `pipenv install` and encountering the error "RuntimeError: location not created nor specified," it may be due to using the pipenv installed in a Python 3.9 environment. To resolve this issue, you should install pipenv in the Python 3.10 environment.

DjangoDockerPython
2022-09-03 11:03 (3 years ago)

Until now, I often created Django images using Alpine Linux and uWSGI, but there is a performance issue when running Python on Alpine Linux. This is a note on changing the Docker image configuration from Alpine to Debian and the HTTP server from uWSGI to Daphne + WhiteNoise.

kubernetes
2022-08-19 10:51 (3 years ago)

This article provides key points to check the configuration in cases where you are using the Nginx Ingress Controller with Kubernetes and Uwsgi for the application server within the Pod, to prevent slow response services from timing out. If these configurations are not extended, it could result in 502 or 504 errors.

Python
2022-08-11 15:06 (3 years ago)

When using version locking systems like Pipenv to set up a Python environment with an Alpine Linux Docker image, installations often encounter difficulties. If installing `cryptography` via Rust is unsuccessful (or too slow and thus undesirable), it is more effective to install `cryptography` via `apk` rather than through Pipenv.

Django
2022-08-06 02:09 (3 years ago)

If you are using version 4 of tinyMCE, you can add an onChange event in the setup option of tinyMCE.init.

2022-07-24 08:46 (3 years ago)

Information on creating a terminal menu that can be navigated using arrow keys without using curses. There were many uncertainties, so I wrote this while referencing other sites. Thank you.

2022-07-20 04:10 (3 years ago)

Extracting email addresses that have hard bounced from Postfix logs using a one-liner. Email sending must be stopped for addresses that have hard bounced.

kubernetes
2022-06-19 14:42 (3 years ago)

I attempted to retrieve the source global IP address from HTTP requests through Kubernetes Ingress, but I ended up obtaining the IP address of Kubernetes' local network, which did not work as intended. After switching Kubernetes to MicroK8s and using its built-in Ingress controller, I was able to successfully retrieve the global remote IP address. This is a note on that experience.

kubernetes
2022-06-19 11:51 (3 years ago)

When using MicroK8s on a server, a separate image repository for ctr is created apart from the server's Docker image repository. Since MicroK8s uses this ctr, Docker-loaded images cannot be used directly. It is necessary to import the images using `microk8s ctr image import`.