Skip to content

Commit 457f0a4

Browse files
committed
added monitor app
1 parent 17e1fd4 commit 457f0a4

File tree

10 files changed

+45
-1
lines changed

10 files changed

+45
-1
lines changed

monitor/__init__.py

Whitespace-only changes.

monitor/admin.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.

monitor/apps.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.apps import AppConfig
2+
3+
4+
class MonitorConfig(AppConfig):
5+
default_auto_field = 'django.db.models.BigAutoField'
6+
name = 'monitor'

monitor/migrations/__init__.py

Whitespace-only changes.

monitor/models.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.db import models
2+
3+
# Create your models here.

monitor/tests.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

monitor/urls.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.urls import path
2+
from . import views
3+
4+
urlpatterns = [
5+
6+
]

monitor/views.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.shortcuts import render
2+
3+
# Create your views here.

webserver/settings.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
'django.contrib.sessions',
3939
'django.contrib.messages',
4040
'django.contrib.staticfiles',
41+
'monitor.apps.MonitorConfig',
4142
]
4243

4344
MIDDLEWARE = [
@@ -106,7 +107,7 @@
106107

107108
LANGUAGE_CODE = 'en-us'
108109

109-
TIME_ZONE = 'UTC'
110+
TIME_ZONE = 'Asia/Tokyo'
110111

111112
USE_I18N = True
112113

webserver/urls.py

+19
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,22 @@
1919
urlpatterns = [
2020
path('admin/', admin.site.urls),
2121
]
22+
23+
# Use include() to add paths from the monitor application
24+
from django.urls import include
25+
26+
urlpatterns += [
27+
path('monitor/', include('monitor.urls')),
28+
]
29+
30+
#Add URL maps to redirect the base URL to our application
31+
from django.views.generic import RedirectView
32+
urlpatterns += [
33+
path('', RedirectView.as_view(url='monitor/', permanent=True)),
34+
]
35+
36+
# Use static() to add url mapping to serve static files during development (only)
37+
from django.conf import settings
38+
from django.conf.urls.static import static
39+
40+
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

0 commit comments

Comments
 (0)