Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
esguerra_lab1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
James Esguerra
esguerra_lab1
Commits
a19e6918
Commit
a19e6918
authored
Mar 16, 2021
by
James Esguerra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added date filter to 'today' template
parent
3875f635
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
views.cpython-38.pyc
pages/__pycache__/views.cpython-38.pyc
+0
-0
views.py
pages/views.py
+2
-0
today.html
templates/today.html
+2
-0
No files found.
pages/__pycache__/views.cpython-38.pyc
View file @
a19e6918
No preview for this file type
pages/views.py
View file @
a19e6918
import
datetime
from
django.shortcuts
import
render
from
django.shortcuts
import
render
from
django.http
import
HttpResponse
from
django.http
import
HttpResponse
from
.forms
import
HomeForm
from
.forms
import
HomeForm
...
@@ -28,4 +29,5 @@ def ShowThisWeek(request):
...
@@ -28,4 +29,5 @@ def ShowThisWeek(request):
def
ShowToday
(
request
):
def
ShowToday
(
request
):
my_date
=
datetime
.
datetime
.
now
()
return
render
(
request
,
'today.html'
)
return
render
(
request
,
'today.html'
)
templates/today.html
View file @
a19e6918
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
{% block content %}
{% block content %}
<h2>
{{ my_date|date:"m.d.D" }}
</h2>
<p>
This is the today page.
</p>
<p>
This is the today page.
</p>
{% endblock %}
{% endblock %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment