This website works better with JavaScript.
Home
Explore
Help
Sign In
yigitcolakoglu
/
MyCity
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
remove previous voting system
pull/1/head
Efe Aydın
6 years ago
parent
049504cb5d
commit
c93f9930ab
3 changed files
with
0 additions
and
48 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+0
-21
server_side/voting-system/__init__.py
+0
-18
server_side/voting-system/db.py
+0
-9
server_side/voting-system/schema.sql
+ 0
- 21
server_side/voting-system/__init__.py
View File
@ -1,21 +0,0 @@
import
os
from
flask
import
Flask
def
create_app
(
)
:
app
=
Flask
(
__name__
)
app
.
config
.
from_mapping
(
SECRET_KEY
=
'
dev
'
,
DATABASE
=
os
.
path
.
join
(
app
.
instance_path
,
'
voting-system.sqlite
'
)
)
app
.
config
.
from_pyfile
(
'
config.py
'
,
silent
=
True
)
try
:
os
.
makedirs
(
app
.
instance_path
)
except
OSError
:
pass
# Already exists
@app.route
(
'
/votings
'
)
def
hello
(
)
:
return
'
Hello, world!
'
return
app
+ 0
- 18
server_side/voting-system/db.py
View File
@ -1,18 +0,0 @@
import
sqlite3
import
click
from
flask
import
current_app
,
g
from
flask.cli
import
with_appcontext
def
get_db
(
)
:
if
'
db
'
not
in
g
:
g
.
db
=
sqlite3
.
connect
(
current_app
.
config
[
'
DATABASE
'
]
)
g
.
db
.
row_factory
=
sqlite3
.
Row
return
g
.
db
def
close_db
(
)
db
=
g
.
pop
(
'
db
'
,
None
)
if
db
is
not
None
:
db
.
close
(
)
+ 0
- 9
server_side/voting-system/schema.sql
View File
@ -1,9 +0,0 @@
DROP
TABLE
IF
EXISTS
votings
;
CREATE
TABLE
votings
(
id
INTEGER
PRIMARY
KEY
AUTOINCREMENT
,
name
TEXT
NOT
NULL
,
desc
TEXT
,
img
TEXT
,
votes
)
Write
Preview
Loading…
Cancel
Save