NewVisitorTest() in functional_tests almost passes, but needs DRY refactor; pair of functions added to HomePageTest() in apps.dashboard.tests; home_page() FBV in .views streamlined using django templating; templating also applied & form w. csrf functionality added to to-do list in home.html
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import render
|
||||
|
||||
def home_page(request):
|
||||
return render(request, 'apps/dashboard/home.html')
|
||||
return render(
|
||||
request,
|
||||
'apps/dashboard/home.html',
|
||||
{'new_item_text': request.POST.get('item-text', '')},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user