---
slug: "uwsgiの設定ファイルでディレクトリを作成"
title: "Creating Directories in the uWSGI Configuration File"
description: "Replace deprecated `from django.utils.translation import ugettext` (broken on Django 4) with `gettext` to fix the import error."
url: "https://www.ytyng.com/en/blog/uwsgiの設定ファイルでディレクトリを作成"
publish_date: "2017-05-21T07:02:36Z"
created: "2017-05-21T07:02:36Z"
updated: "2026-05-11T13:21:53.211Z"
categories: []
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/920bd1bfad8d477cbc641de4025e3bf6.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "en"
---

# Creating Directories in the uWSGI Configuration File

<pre>[uwsgi]<br /><br />if-not-dir = /var/run/django/<br />&nbsp;hook-asap = exec: sudo mkdir -m 777 /var/run/django<br />end-if =</pre>
