Skip to content

Commit 2665cf4

Browse files
Swilder-Mzibuyu1995
authored andcommitted
fix(django): update python version
Signed-off-by: Swilder-M <[email protected]>
1 parent 2a34f9a commit 2665cf4

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
"""
2-
ASGI config for mqtt_test project.
2+
ASGI config for django_mqtt project.
33
44
It exposes the ASGI callable as a module-level variable named ``application``.
55
66
For more information on this file, see
7-
https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/
7+
https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/
88
"""
99

1010
import os
1111

1212
from django.core.asgi import get_asgi_application
1313

14-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mqtt_test.settings')
14+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_mqtt.settings')
1515

1616
application = get_asgi_application()

mqtt-client-Django/mqtt_test/settings.py renamed to mqtt-client-Django/django_mqtt/settings.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
2-
Django settings for mqtt_test project.
2+
Django settings for django_mqtt project.
33
4-
Generated by 'django-admin startproject' using Django 4.1.1.
4+
Generated by 'django-admin startproject' using Django 5.1.5.
55
66
For more information on this file, see
7-
https://docs.djangoproject.com/en/4.1/topics/settings/
7+
https://docs.djangoproject.com/en/5.1/topics/settings/
88
99
For the full list of settings and their values, see
10-
https://docs.djangoproject.com/en/4.1/ref/settings/
10+
https://docs.djangoproject.com/en/5.1/ref/settings/
1111
"""
1212

1313
from pathlib import Path
@@ -17,10 +17,10 @@
1717

1818

1919
# Quick-start development settings - unsuitable for production
20-
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
20+
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
2121

2222
# SECURITY WARNING: keep the secret key used in production secret!
23-
SECRET_KEY = 'django-insecure-key'
23+
SECRET_KEY = 'django-insecure-%j=o#mp5whi0o1%j0+t7qj178)90e!l0&3lha*c&*!w9tml_pj'
2424

2525
# SECURITY WARNING: don't run with debug turned on in production!
2626
DEBUG = True
@@ -43,13 +43,13 @@
4343
'django.middleware.security.SecurityMiddleware',
4444
'django.contrib.sessions.middleware.SessionMiddleware',
4545
'django.middleware.common.CommonMiddleware',
46-
# 'django.middleware.csrf.CsrfViewMiddleware',
46+
'django.middleware.csrf.CsrfViewMiddleware',
4747
'django.contrib.auth.middleware.AuthenticationMiddleware',
4848
'django.contrib.messages.middleware.MessageMiddleware',
4949
'django.middleware.clickjacking.XFrameOptionsMiddleware',
5050
]
5151

52-
ROOT_URLCONF = 'mqtt_test.urls'
52+
ROOT_URLCONF = 'django_mqtt.urls'
5353

5454
TEMPLATES = [
5555
{
@@ -67,11 +67,11 @@
6767
},
6868
]
6969

70-
WSGI_APPLICATION = 'mqtt_test.wsgi.application'
70+
WSGI_APPLICATION = 'django_mqtt.wsgi.application'
7171

7272

7373
# Database
74-
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
74+
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
7575

7676
DATABASES = {
7777
'default': {
@@ -82,7 +82,7 @@
8282

8383

8484
# Password validation
85-
# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
85+
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
8686

8787
AUTH_PASSWORD_VALIDATORS = [
8888
{
@@ -101,7 +101,7 @@
101101

102102

103103
# Internationalization
104-
# https://docs.djangoproject.com/en/4.1/topics/i18n/
104+
# https://docs.djangoproject.com/en/5.1/topics/i18n/
105105

106106
LANGUAGE_CODE = 'en-us'
107107

@@ -113,12 +113,12 @@
113113

114114

115115
# Static files (CSS, JavaScript, Images)
116-
# https://docs.djangoproject.com/en/4.1/howto/static-files/
116+
# https://docs.djangoproject.com/en/5.1/howto/static-files/
117117

118118
STATIC_URL = 'static/'
119119

120120
# Default primary key field type
121-
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
121+
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
122122

123123
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
124124

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from django.http import JsonResponse
44

5-
from mqtt_test.mqtt import client as mqtt_client
5+
from django_mqtt.mqtt import client as mqtt_client
66

77

88
def publish_message(request):
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
"""
2-
WSGI config for mqtt_test project.
2+
WSGI config for django_mqtt project.
33
44
It exposes the WSGI callable as a module-level variable named ``application``.
55
66
For more information on this file, see
7-
https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/
7+
https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/
88
"""
99

1010
import os
1111

1212
from django.core.wsgi import get_wsgi_application
1313

14-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mqtt_test.settings')
14+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_mqtt.settings')
1515

1616
application = get_wsgi_application()

mqtt-client-Django/manage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def main():
88
"""Run administrative tasks."""
9-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mqtt_test.settings')
9+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_mqtt.settings')
1010
try:
1111
from django.core.management import execute_from_command_line
1212
except ImportError as exc:

0 commit comments

Comments
 (0)