Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group 25
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
Andre Matthew Dumandan
widget_group 25
Commits
2aade1d3
Commit
2aade1d3
authored
May 12, 2022
by
Rau Layug
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Django templates and updated CalendarApp views
parent
6eea7d8d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
4 deletions
+43
-4
views.py
widget_group_25/calendarapp/views.py
+9
-3
settings.py
widget_group_25/widget_group_25/settings.py
+2
-1
base.html
widget_group_25/widget_group_25/template/base.html
+17
-0
index.html
widget_group_25/widget_group_25/template/index.html
+15
-0
No files found.
widget_group_25/calendarapp/views.py
View file @
2aade1d3
...
...
@@ -15,10 +15,16 @@ def index(request):
target_date
=
event
.
target_date
activity
=
event
.
activity
estimated_hours
=
event
.
estimated_hours
course_section
=
"{} {} {}"
.
format
(
course
.
course_code
,
course
.
course_title
,
course
.
section
)
course_section
=
"{} {} {}"
.
format
(
course
.
course_code
,
course
.
course_title
,
course
.
section
)
mode
=
location
.
get_mode_display
()
venue
=
location
.
venue
response
+=
"Target Date: {}<br>Activity: {}<br>Estimated Hours: {}<br>Course/Section: {}<br>Mode: {}<br>Venue: {}<br><br>"
.
format
(
target_date
,
activity
,
estimated_hours
,
course_section
,
mode
,
response
+=
"Target Date: {}<br>Activity: {}<br>Estimated Hours: {}<br>Course/Section: {}<br>Mode: {}<br>Venue: {}<br><br>"
.
format
(
target_date
,
activity
,
estimated_hours
,
course_section
,
mode
,
venue
)
return
HttpResponse
(
response
)
def
index_view
(
request
):
return
render
(
request
,
'index.html'
,
{
'name'
:
Rau
})
widget_group_25/widget_group_25/settings.py
View file @
2aade1d3
...
...
@@ -123,7 +123,8 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/
STATIC_URL
=
'static/'
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
[
os
.
path
.
join
(
BASE_DIR
,
'project/static'
)]
# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
...
...
widget_group_25/widget_group_25/template/base.html
0 → 100644
View file @
2aade1d3
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>
{% block title %}BASE HTML{% endblock %}
</title>
{% block styles %}{% endblock %}
</head>
<body>
<div
id=
"content"
>
{% block content %}This is the base html{% endblock %}
</div>
{% block scripts %}{% endblock %}
</body>
</html>
\ No newline at end of file
widget_group_25/widget_group_25/template/index.html
0 → 100644
View file @
2aade1d3
{% extends 'base.html' %}
{% load static %}
{% block title %}Index Card{% endblock %}
{% block styles %}
<link
rel=
"stylesheet"
href=
"{% static 'css/styles.css' %"
>
{% endblock %}
{% block content %}
<form
action=
"/index_card"
method=
"post"
>
{% csrf_token %}
{{ form }}
<input
type=
"submit"
value=
"Submit"
>
</form>
\ No newline at end of file
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