Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
zesje
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Réouven ASSOULY
zesje
Commits
dfcca625
Commit
dfcca625
authored
7 years ago
by
Thomas Roos
Browse files
Options
Downloads
Plain Diff
Merge branch 'react' of
ssh://gitlab.kwant-project.org:443/zesje/zesje
into react
parents
e926c0eb
9290c2f3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
zesje/__init__.py
+8
-6
8 additions, 6 deletions
zesje/__init__.py
zesje/api.py
+5
-5
5 additions, 5 deletions
zesje/api.py
with
14 additions
and
11 deletions
.gitignore
+
1
−
0
View file @
dfcca625
...
...
@@ -56,6 +56,7 @@ typings/
# Yarn lock file
yarn.lock
package-lock.json
# dotenv environment variables file
.env
...
...
This diff is collapsed.
Click to expand it.
zesje/__init__.py
+
8
−
6
View file @
dfcca625
from
os
import
path
from
os.path
import
abspath
,
dirname
,
isfile
from
werkzeug.exceptions
import
NotFound
from
flask
import
Flask
from
flask_basicauth
import
BasicAuth
...
...
@@ -7,8 +9,7 @@ from . import db, api
static_folder_path
=
path
.
join
(
abspath
(
dirname
(
__file__
)),
'
static
'
)
app
=
Flask
(
__name__
,
static_folder
=
static_folder_path
)
app
=
Flask
(
__name__
,
static_folder
=
static_folder_path
)
db
.
use_db
()
...
...
@@ -23,7 +24,8 @@ app.register_blueprint(api.app, url_prefix='/api')
@app.route
(
'
/
'
)
@app.route
(
'
/<file>
'
)
def
index
(
file
=
''
):
if
not
isfile
(
path
.
join
(
static_folder_path
,
file
)):
file
=
'
index.html
'
return
app
.
send_static_file
(
file
)
\ No newline at end of file
def
index
(
file
=
'
index.html
'
):
try
:
return
app
.
send_static_file
(
file
)
except
NotFound
:
return
app
.
send_static_file
(
'
index.html
'
)
This diff is collapsed.
Click to expand it.
zesje/api.py
+
5
−
5
View file @
dfcca625
...
...
@@ -53,8 +53,8 @@ def post_graders():
except
KeyError
:
abort
(
400
)
return
jsonify
(
{
'
id
'
:
new_grader
.
id
,
'
first_name
'
:
grader
_spec
[
'
first_name
'
]
,
'
last_name
'
:
grader
_spec
[
'
last_name
'
]
,
}
)
return
jsonify
(
id
=
new_grader
.
id
,
first_name
=
new_
grader
.
first_name
,
last_name
=
new_
grader
.
last_name
,
)
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