Compare commits

..

No commits in common. "1e2cc408deaf85b2d722bd7f9ca6eb027637fec4" and "49c79f3bbef6183b7b346199a055b4a5a9cc4edc" have entirely different histories.

8 changed files with 2 additions and 31 deletions

View File

View File

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

View File

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

View File

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

View File

@ -1,11 +0,0 @@
from django.test import TestCase
from django.http import HttpRequest
from lists.views import home_page
# Create your tests here.
class HomePageTest(TestCase):
def test_home_page_returns_correct_html(self):
response = self.client.get("/")
self.assertContains(response, "<title>To-Do lists</title>")
self.assertContains(response, "<html>")
self.assertContains(response, "</html>")

View File

@ -1,6 +0,0 @@
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def home_page(request):
return HttpResponse("<html><title>To-Do lists</title></html>")

View File

@ -14,9 +14,9 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path 1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.contrib import admin
from django.urls import path from django.urls import path
from lists.views import home_page
urlpatterns = [ urlpatterns = [
path("", home_page, name="home"), path('admin/', admin.site.urls),
] ]