Last active
May 31, 2020 15:50
-
-
Save AtufaShireen/1f2df5877d05d60cbded8c2a48f05e85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.shortcuts import render | |
from django.http import HttpResponse | |
def home(request): | |
posts = [ | |
{ | |
'author': 'Atufa Shireen', | |
'title': 'Making A Web App', | |
'subtitle': 'Is making webapp difficult than website', | |
'story': 'A web app, is an application that runs online, has usually quite a bit' | |
' of functionality and does a bunch of data crunching on the back-end. So it is typical', | |
'published': 'April 14 2002' | |
}, | |
{ | |
'author': 'John Doe', | |
'title': 'Making A Website', | |
'subtitle': 'How to make a cms website', | |
'story': 'Building a content management system can seem like a daunting task to the novice PHP developer.' | |
' However, it needn’t be that difficult.In this tutorial I’ll show you how to build a basic, but fully functional', | |
'published': 'April 20 2002' | |
} | |
] | |
content={'posts':posts} | |
return render(request, 'blogapp/home.html',posts) | |
def about(request): | |
return render(request, 'blogapp/about.html') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment