Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chaos_familien_duell_frontend
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor 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
mowoe
chaos_familien_duell_frontend
Commits
0697fa0b
Commit
0697fa0b
authored
6 years ago
by
leo
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
ssh://gitlab.warpzone.ms:444/mowoe/chaos_familien_duell_frontend
parents
b33a3e4d
b4588b02
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dockercont/Dockerfile
+2
-0
2 additions, 0 deletions
dockercont/Dockerfile
main.py
+2
-0
2 additions, 0 deletions
main.py
model/__init__.py
+8
-1
8 additions, 1 deletion
model/__init__.py
model/sample_creds.json
+3
-0
3 additions, 0 deletions
model/sample_creds.json
with
15 additions
and
1 deletion
dockercont/Dockerfile
+
2
−
0
View file @
0697fa0b
FROM
tiangolo/uwsgi-nginx-flask:python3.6
RUN
pip
install
peewee
RUN
pip
install
mysql
RUN
git clone https://gitlab.warpzone.ms/mowoe/chaos_familien_duell_frontend.git /zwisch
ADD
creds.json /app/
RUN
mv
/zwisch/
*
/app
This diff is collapsed.
Click to expand it.
main.py
+
2
−
0
View file @
0697fa0b
from
flask
import
Flask
from
view.questions
import
questions
from
model
import
Question
import
json
from
model
import
Question
...
...
This diff is collapsed.
Click to expand it.
model/__init__.py
+
8
−
1
View file @
0697fa0b
from
peewee
import
SqliteDatabase
from
peewee
import
Model
from
peewee
import
MySQLDatabase
import
json
sqlite
=
SqliteDatabase
(
"
model/cfd.sqlite
"
,
pragmas
=
{
'
foreign_keys
'
:
1
})
mysql_creds
=
json
.
load
(
open
(
"
./creds.json
"
))
sqlite
=
SqliteDatabase
(
"
static/cfd.sqlite
"
,
pragmas
=
{
'
foreign_keys
'
:
1
})
sqlite
.
connect
()
#sqlite = MySQLDatabase(mysql_creds["db"], user=mysql_creds["user"], password=mysql_creds['password'],
# host=mysql_creds['host'], port=int(mysql_creds['port']),)
class
BaseModel
(
Model
):
...
...
This diff is collapsed.
Click to expand it.
model/sample_creds.json
0 → 100644
+
3
−
0
View file @
0697fa0b
{
"host"
:
""
,
"user"
:
""
,
"password"
:
""
,
"db"
:
""
,
"port"
:
1337
}
\ No newline at end of file
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