-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91cf3ac
commit 7d63485
Showing
96 changed files
with
443 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
.idea | ||
*py[cod] | ||
logs/log* | ||
*avi | ||
*.avi | ||
*.sqlite | ||
*.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"python.pythonPath": "C:\\Users\\elblo\\AppData\\Local\\Programs\\Python\\Python37-32\\python.exe" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
from controller import create_app | ||
from flask_sqlalchemy import SQLAlchemy | ||
import db | ||
from controller.models.models import Wanderpi | ||
|
||
app = create_app('dev') | ||
db = SQLAlchemy(app) | ||
|
||
if __name__ == '__main__': | ||
#app.run(threaded=True, host="0.0.0.0") | ||
db.Base.metadata.create_all(db.engine) | ||
app.run(threaded=True, host="0.0.0.0", ssl_context='adhoc') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,42 @@ | ||
from werkzeug.security import generate_password_hash, check_password_hash | ||
import db | ||
from sqlalchemy import Column, Integer, String, Float, DateTime, Text | ||
from datetime import datetime | ||
|
||
class Wanderpi(db.Model): | ||
class Wanderpi(db.Base): | ||
__tablename__ = 'video' | ||
id = db.Column(db.String(256), primary_key=True) | ||
name = db.Column(db.String(256), nullable=False) | ||
lat = db.Column(db.String(256), nullable=False) | ||
long = db.Column(db.String(256), nullable=False) | ||
|
||
id = Column(String(256), primary_key=True) | ||
name = Column(String(256), nullable=False) | ||
lat = Column(String(256), nullable=False) | ||
long = Column(String(256), nullable=False) | ||
thumbnail_url = Column(String(256), nullable=False) | ||
created_date = Column(DateTime, default=datetime.utcnow) | ||
|
||
|
||
def __repr__(self): | ||
return f'<User {self.id}>' | ||
|
||
def set_id(self, id): | ||
self.id = id | ||
|
||
|
||
def set_name(self, id): | ||
self.id = id | ||
|
||
def save(self): | ||
if not self.id: | ||
db.session.add(self) | ||
db.session.add(self) | ||
db.session.commit() | ||
|
||
|
||
@staticmethod | ||
def delete(id): | ||
db.session.query(Wanderpi).filter(Wanderpi.id == id).delete() | ||
db.session.commit() | ||
return True | ||
|
||
|
||
@staticmethod | ||
def get_by_id(id): | ||
return Wanderpi.query.get(id) | ||
return db.session.query(Wanderpi).get(id) | ||
|
||
@staticmethod | ||
def get_all(): | ||
return Wanderpi.query.all() | ||
return db.session.query(Wanderpi).all() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.camera-view-responsive | ||
{ | ||
border-radius: 5px; | ||
margin-bottom: 12px; | ||
} | ||
|
||
body { | ||
background-color: #6F6F6F; | ||
} | ||
|
||
.change-my-color { | ||
width: 200px; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$light: #dddddd; | ||
$dark: #000; | ||
|
||
@import "bootstrap"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,5 @@ | |
width: 100% !important; | ||
height: 100% !important; | ||
border-radius: 5px; | ||
} | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
function deleteVideo(id){ | ||
console.log(id); | ||
} | ||
|
||
function shareVideo(id){ | ||
|
||
if (navigator.share) { | ||
navigator.share({ | ||
title: 'WebShare API Demo', | ||
url: 'https://codepen.io/ayoisaiah/pen/YbNazJ' | ||
}).then(() => { | ||
console.log('Thanks for sharing!'); | ||
}) | ||
.catch(console.error); | ||
} else { | ||
// fallback | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
function showPosition(lat, long) { | ||
var gps = document.getElementById("gps_text"); | ||
|
||
gps.innerHTML = lat + " " + long; | ||
var map = L.map('map-container-google-1'); | ||
|
||
map.setView([lat,long], 13); | ||
|
||
googleStreets = L.tileLayer('http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',{ | ||
maxZoom: 20, | ||
subdomains:['mt0','mt1','mt2','mt3'] | ||
}).addTo(map); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.