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
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
app = Flask(__name__) | |
app.config.from_object('config.DevelopmentConfig') | |
db = SQLAlchemy(app) | |
class User(db.Model): | |
__tablename__ = 'users' |
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
import pymysql | |
from flask import Blueprint, request, render_template, json, Flask | |
from flask_sqlalchemy import SQLAlchemy | |
from sqlalchemy import create_engine | |
from app.users_bundle.models import User | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.exc import SQLAlchemyError | |
app = Flask(__name__) | |
app.config.from_object('config.DevelopmentConfig') |
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
from flask import Flask, render_template | |
from flask_sqlalchemy import SQLAlchemy | |
from sqlalchemy import create_engine | |
from sqlalchemy_utils import database_exists, create_database | |
from app.users_bundle.controllers import users_bundle | |
app = Flask(__name__) | |
app.config.from_object('config.DevelopmentConfig') | |
db = SQLAlchemy(app) |
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
/** | |
* Created by Davide Pugliese on 26/02/17. | |
*/ | |
import { Observable } from "rxjs/Observable"; | |
import "rxjs/add/observable/from"; | |
let request = require('request'); | |
import { userObservable } from "./user.service"; | |
import {first} from "rxjs/operator/first"; | |
import {last} from "rxjs/operator/last"; |
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
/** | |
* Created by Davide Pugliese on 26/02/17. | |
*/ | |
import {Observable, Subscribable} from "rxjs/Observable"; | |
import "rxjs/add/observable/from"; | |
import "rxjs/add/observable/fromPromise"; | |
import "rxjs/add/observable/of"; | |
import "rxjs/add/operator/map"; | |
import "rxjs/add/observable/defer"; |
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
<?php | |
namespace App\Db; | |
class DbMgmt | |
{ | |
const SERVERNAME = 'localhost'; | |
const PORT = "3306"; | |
const USERNAME = 'root'; |
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
<?php | |
namespace App\Db; | |
class DbMgmt | |
{ | |
const SERVERNAME = 'localhost'; | |
const PORT = "3306"; | |
const USERNAME = 'root'; |
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
<?php | |
namespace App\Controller; | |
use App\Db\DbMgmt; | |
use App\Db\DbObj; | |
use App\Entity\Answer; | |
use App\Entity\FormField; | |
use App\Entity\User; |
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
<?php | |
namespace Entity; | |
use Db\DbObj; | |
class FormField | |
{ | |
public $the_table; |
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
<?php | |
/** | |
* @author Davide Pugliese | |
* @uses PDO | |
* | |
* This is a little engine to run queries the smart way. | |
* | |
*/ |