Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mason-today-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
mason-today-web
Commits
8c8df665
Commit
8c8df665
authored
Oct 04, 2018
by
Aaron R Poulter-martinez
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mason-today-web-v2' of git.gmu.edu:srct/mason-today-web into mason-today-web-v2
parents
ef226972
52be2267
Pipeline
#3101
failed with stages
in 1 minute and 12 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
5 deletions
+31
-5
mason_today_web/api/templates/api/apiwelcome.html
mason_today_web/api/templates/api/apiwelcome.html
+1
-1
mason_today_web/api/views.py
mason_today_web/api/views.py
+2
-3
mason_today_web/mason_today_web/settings.py
mason_today_web/mason_today_web/settings.py
+4
-1
mason_today_web/mason_today_web/templates/mason_today_web/homepage.html
...b/mason_today_web/templates/mason_today_web/homepage.html
+15
-0
mason_today_web/mason_today_web/urls.py
mason_today_web/mason_today_web/urls.py
+3
-0
mason_today_web/mason_today_web/views.py
mason_today_web/mason_today_web/views.py
+6
-0
No files found.
mason_today_web/api/templates/api/apiwelcome.html
View file @
8c8df665
...
...
@@ -10,7 +10,7 @@
<p>
You can check out the following avenues for accessing the events happening on campus:
<ul>
<li>
Get Connected:
<a
href=
"/api/rawdata"
>
masontoday.gmu.io/api/rawdata
</a></li>
<li>
<a
href=
"{% url 'rawdata' %}"
>
All events, unsorted
</a></li>
</ul>
</p>
<p>
...
...
mason_today_web/api/views.py
View file @
8c8df665
...
...
@@ -10,8 +10,6 @@ def apiwelcome(request):
return
render
(
request
,
'api/apiwelcome.html'
)
def
rawdata
(
request
):
if
Event
.
objects
.
all
()
==
False
:
return
HttpResponse
(
"There are no events! --DEBUG"
)
eventlist
=
[]
for
event
in
Event
.
objects
.
all
():
eventlist
.
append
({
...
...
@@ -23,4 +21,5 @@ def rawdata(request):
'dayofweek'
:
event
.
dayofweek
,
'duration'
:
event
.
duration
})
return
HttpResponse
(
json
.
dumps
(
eventlist
,
ensure_ascii
=
False
),
content_type
=
"application/json"
)
\ No newline at end of file
return
HttpResponse
(
json
.
dumps
(
eventlist
,
ensure_ascii
=
False
),
content_type
=
"application/json"
)
\ No newline at end of file
mason_today_web/mason_today_web/settings.py
View file @
8c8df665
...
...
@@ -55,7 +55,10 @@ ROOT_URLCONF = 'mason_today_web.urls'
TEMPLATES
=
[
{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'DIRS'
:
[],
'DIRS'
:
[
os
.
path
.
join
(
BASE_DIR
,
'mason_today_web/templates/mason_today_web'
),
],
'APP_DIRS'
:
True
,
'OPTIONS'
:
{
'context_processors'
:
[
...
...
mason_today_web/mason_today_web/templates/mason_today_web/homepage.html
0 → 100644
View file @
8c8df665
<!DOCTYPE html>
<html>
<head>
Welcome to MasonToday!
</head>
<body>
<p>
Take a li'l look around. Ain't the whitespace purty?
</p>
<p>
We don't have much, but you should go check out these fun things:
<ul>
<li><a
href=
"{% url 'apiwelcome' %}"
>
The MasonToday API
</a></li>
</ul>
</p>
<p>
Well you should know that this piece of art was made by Student Run Computing and Technology from GMU. Check out the source code over at
<a
href=
'git.gmu.edu/srct/mason-today-web'
>
git.gmu.edu/srct/mason-today-web
</a></p>
</body>
</html>
\ No newline at end of file
mason_today_web/mason_today_web/urls.py
View file @
8c8df665
...
...
@@ -16,7 +16,10 @@ Including another URLconf
from
django.contrib
import
admin
from
django.urls
import
path
,
include
from
.
import
views
urlpatterns
=
[
path
(
''
,
views
.
homepage
,
name
=
'homepage'
),
path
(
'admin/'
,
admin
.
site
.
urls
),
path
(
'api/'
,
include
(
'api.urls'
)),
]
mason_today_web/mason_today_web/views.py
0 → 100644
View file @
8c8df665
from
django.shortcuts
import
render
# Create some views
def
homepage
(
request
):
return
render
(
request
,
'homepage.html'
)
\ 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