Djangoプロジェクトの初期設定を追加。環境変数に基づく設定をsettings.pyに実装し、ASGIおよびWSGI設定ファイルを作成。expensesアプリを追加し、基本的なURLルーティングとテンプレートを整備。作業ログをdiary.mdに追記。

This commit is contained in:
president
2025-12-19 15:30:38 +09:00
parent bfca4ee185
commit 5fc2a31f50
22 changed files with 379 additions and 7 deletions

0
expenses/__init__.py Normal file
View File

3
expenses/admin.py Normal file
View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
expenses/apps.py Normal file
View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class ExpensesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'expenses'

View File

3
expenses/models.py Normal file
View File

@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

3
expenses/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

11
expenses/urls.py Normal file
View File

@@ -0,0 +1,11 @@
from django.urls import path
from . import views
urlpatterns = [
path('', views.csv_upload, name='csv_upload'),
path('expenses/', views.expense_list, name='expense_list'),
path('reports/monthly/', views.monthly_report, name='monthly_report'),
path('reports/monthly/pdf/', views.monthly_report_pdf, name='monthly_report_pdf'),
]

17
expenses/views.py Normal file
View File

@@ -0,0 +1,17 @@
from django.shortcuts import render
def csv_upload(request):
return render(request, 'expenses/csv_upload.html')
def expense_list(request):
return render(request, 'expenses/expense_list.html')
def monthly_report(request):
return render(request, 'expenses/monthly_report.html')
def monthly_report_pdf(request):
return render(request, 'expenses/monthly_report_pdf.html')