Permalink
Browse files

Bootstrap project

- Basic Flask app
- 3 views Home, Login, Secret using ui.router
1 parent 00b4de3 commit 602924eb68899930e9fc960763ac9f8d6e08ba8c @nguyenkims committed Dec 12, 2015
Showing with 123 additions and 0 deletions.
  1. +11 −0 .gitignore
  2. +22 −0 README.md
  3. +18 −0 app.py
  4. +4 −0 requirements.txt
  5. +25 −0 static/bower.json
  6. +19 −0 static/index.html
  7. +21 −0 static/main.js
  8. +1 −0 static/partials/home.tpl.html
  9. +1 −0 static/partials/login.tpl.html
  10. +1 −0 static/partials/secret.tpl.html
View
@@ -0,0 +1,11 @@
+# pycharm
+.idea/
+
+# database
+*.sqlite
+
+# bower dependencies
+bower_components/
+
+# virtualenv
+venv/
View
@@ -0,0 +1,22 @@
+This webapp requires these programs:
+
+- Python 2.7.*
+- pip
+- virtualenv
+- bower
+
+Activate virtualenv
+
+> virtualenv venv
+> source venv/bin/activate
+
+Install all required Python libraries
+
+> pip install -r requirements.txt
+
+Install all required JS libraries
+
+> cd static/
+> bower install
+
+Enjoy!
View
@@ -0,0 +1,18 @@
+import flask
+from flask import Flask
+
+app = Flask(__name__)
+
+
+@app.route('/islive')
+def islive():
+ return "it's live"
+
+
+@app.route('/')
+def index():
+ return flask.redirect('/static/index.html')
+
+
+if __name__ == '__main__':
+ app.run(debug=True)
View
@@ -0,0 +1,4 @@
+Flask==0.10.1
+PyJWT==1.4.0
+Flask-SQLAlchemy==1.0
+requests==2.7.0
View
@@ -0,0 +1,25 @@
+{
+ "name": "demo satellizer",
+ "version": "0.0.0",
+ "homepage": "https://github.com/nguyenkims/satellizer-demo",
+ "authors": [
+ "Son Nguyen Kim"
+ ],
+ "description": "a simple webapp with regular and facebook login",
+ "keywords": [
+ "satellizer",
+ "angularjs"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "angular": "angularjs#~1.4.8",
+ "angular-ui-router": "~0.2.15"
+ }
+}
View
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Demo Satellizer</title>
+</head>
+<body ng-app="DemoApp">
+
+<a ui-sref="home">Home</a>
+<a ui-sref="login">Login</a>
+<a ui-sref="secret">Secret</a>
+
+<div ui-view></div>
+
+<script src="bower_components/angular/angular.min.js"></script>
+<script src="bower_components/angular-ui-router/release/angular-ui-router.min.js"></script>
+<script src="main.js"></script>
+</body>
+</html>
View
@@ -0,0 +1,21 @@
+var app = angular.module('DemoApp', ['ui.router']);
+
+app.config(function ($stateProvider, $urlRouterProvider) {
+
+ $stateProvider
+ .state('home', {
+ url: '/home',
+ templateUrl: 'partials/home.tpl.html'
+ })
+ .state('secret', {
+ url: '/secret',
+ templateUrl: 'partials/secret.tpl.html',
+ })
+ .state('login', {
+ url: '/login',
+ templateUrl: 'partials/login.tpl.html'
+ });
+
+ $urlRouterProvider.otherwise('/home');
+
+});
@@ -0,0 +1 @@
+Home
@@ -0,0 +1 @@
+Login
@@ -0,0 +1 @@
+Secret

0 comments on commit 602924e

Please sign in to comment.