Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unablew to get home.html to display #199

Open
jpoblocki77 opened this issue Jan 18, 2023 · 0 comments
Open

Unablew to get home.html to display #199

jpoblocki77 opened this issue Jan 18, 2023 · 0 comments

Comments

@jpoblocki77
Copy link

Home.html

<title></title> {% for post in posts %}

{{ post.title }}

By {{ post.author }} on {{ post.date_posted }}

{{ post.content }}

{% endfor %}

Blog views.py
from django.shortcuts import render

Create your views here.

posts = [
{
'author': 'CoreyMS',
'title': 'Blog Post One',
'content': 'First Blog Content Post',
'date_posted': 'August 27,2018'
},
{
'author': 'Jane Doe',
'title': 'Blog Post Two',
'content': 'Second Blog Content Post',
'date_posted': 'August 28,2018'
}
]

def home(request):
context = {
'posts':posts
}
return render(request, 'blog/home.html, context)

def about(request):
return render(request, 'blog/about.html')

I just get a blank white page but no errors Please Help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant