Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Backend
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
swp-unisport
team-warumkeinrust
Backend
Commits
9621e0ce
Commit
9621e0ce
authored
3 years ago
by
borzechof99
Browse files
Options
Downloads
Patches
Plain Diff
Adhere to Linter
Co-authored-by:
Dominik Pietrak
<
dominip89@mi.fu-berlin.de
>
parent
29ac1275
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
unisportomat/quiz/views.py
+6
-4
6 additions, 4 deletions
unisportomat/quiz/views.py
with
6 additions
and
4 deletions
unisportomat/quiz/views.py
+
6
−
4
View file @
9621e0ce
...
...
@@ -2,14 +2,13 @@
Defines the views for the API
"""
# from django.shortcuts
import
render
import
copy
from
rest_framework
import
viewsets
from
rest_framework.views
import
APIView
from
rest_framework.response
import
Response
from
django.shortcuts
import
get_object_or_404
from
django.http
import
HttpResponse
from
.pagination
import
PageNumberWithPageSizePagination
import
copy
from
.course_scraper.course_scraper
import
scraping
...
...
@@ -313,7 +312,11 @@ class ScraperView(APIView):
View for the Scraper, including GET and POST
"""
def
get
(
self
,
request
):
def
get
(
self
,
request
):
# pylint: disable=too-many-locals
"""
Scrapes the Sports currently on the default website,
and sends a diff of the current sports and the scraped ones
"""
# Scrape Sports from their website
scraped_sports
=
scraping
()
...
...
@@ -457,5 +460,4 @@ class ScraperView(APIView):
sport
.
save
()
# TODO: Maybe Redirect?
return
Response
(
status
=
200
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment