Skip to content

Commit

Permalink
Added HOME App
Browse files Browse the repository at this point in the history
  • Loading branch information
app-generator committed Jan 19, 2024
1 parent 03889a4 commit 890c0e0
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 0 deletions.
Empty file added home/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions home/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions home/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class HomeConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "home"
Empty file added home/migrations/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions home/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions home/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
7 changes: 7 additions & 0 deletions home/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.urls import path

from . import views

urlpatterns = [
path("", views.index, name="index"),
]
14 changes: 14 additions & 0 deletions home/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from django.http import HttpResponse
from django.shortcuts import render
from datetime import datetime

# Create your views here.

from .models import *

def index(request):

context = {
'date': datetime.today().strftime('%Y-%m-%d %H:%M:%S'),
}
return HttpResponse("Hello! time is: " + context['date'])

0 comments on commit 890c0e0

Please sign in to comment.