actual commit from last attempt, now incl. all new files
This commit is contained in:
0
apps/dashboard/__init__.py
Normal file
0
apps/dashboard/__init__.py
Normal file
3
apps/dashboard/admin.py
Normal file
3
apps/dashboard/admin.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
||||||
5
apps/dashboard/apps.py
Normal file
5
apps/dashboard/apps.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class DashboardConfig(AppConfig):
|
||||||
|
name = 'apps.dashboard'
|
||||||
0
apps/dashboard/migrations/__init__.py
Normal file
0
apps/dashboard/migrations/__init__.py
Normal file
3
apps/dashboard/models.py
Normal file
3
apps/dashboard/models.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
# Create your models here.
|
||||||
10
apps/dashboard/tests.py
Normal file
10
apps/dashboard/tests.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
class HomePageTest(TestCase):
|
||||||
|
def test_uses_home_template(self):
|
||||||
|
response = self.client.get('/')
|
||||||
|
self.assertTemplateUsed(response, 'apps/dashboard/home.html')
|
||||||
|
|
||||||
|
def test_renders_homepage_content(self):
|
||||||
|
response = self.client.get('/')
|
||||||
|
self.assertContains(response, 'To-Do')
|
||||||
4
apps/dashboard/views.py
Normal file
4
apps/dashboard/views.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
def home_page(request):
|
||||||
|
return render(request, 'apps/dashboard/home.html')
|
||||||
3
templates/apps/dashboard/home.html
Normal file
3
templates/apps/dashboard/home.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<html>
|
||||||
|
<title>To-Do lists</title>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user