Skip to content

Commit 2d1f985

Browse files
committed
Rearranged app structure to ease in testing locally
1 parent ec451ce commit 2d1f985

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+69
-20
lines changed

api/AlchemyAPI.py AlchemyAPI.py

File renamed without changes.

api/AlchemyAPI.pyc AlchemyAPI.pyc

File renamed without changes.

api/__init__.py __init__.py

File renamed without changes.

api/api.py alchemy.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
def index():
66
return app.send_static_file('index.html')
77

8-
@app.route("/v1/documents/")
9-
def documents():
10-
return ''
8+
@app.route('/api/login', methods="POST")
9+
def login():
10+
app.logger.debug(str(request.form))
11+
if 'authKey' in request.form and 'userID' in request.form:
12+
userID = request.form['userID']
13+
authKey = request.form['authKey']
14+
return 'success'
15+
abort(400)
1116

1217
@app.route('/static/<path:file_path>')
1318
def static_fetch(file_path):

alchemy.pyc

1.25 KB
Binary file not shown.

api/docParse.py docParse.py

File renamed without changes.

api/docParse.pyc docParse.pyc

File renamed without changes.

api/manage.py manage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
44

55
from flask.ext.script import Manager, Server
6-
from api import app
6+
from alchemy import app
77

88
manager = Manager(app)
99

api/models.py models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import datetime
22
from flask import url_for
3-
from api import db
3+
from alchemy import db
44

55
class Document(db.Document):
66
created_at = db.DateTimeField(default=datetime.datetime.now, required=True)

api/nlpKey.txt nlpKey.txt

File renamed without changes.

public/app/partials/partial1.html

-1
This file was deleted.
File renamed without changes.
File renamed without changes.

public/app/coffee/app.coffee static/coffee/app.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# Declare app level module which depends on filters, and services
44
angular.module("myApp", ["myApp.filters", "myApp.services", "myApp.directives"]).config ["$routeProvider", ($routeProvider) ->
55
$routeProvider.when "/",
6-
templateUrl: "partials/main.html"
6+
templateUrl: "/static/partials/main.html"
77
controller: MainCtrl
88

99
$routeProvider.when "/view2",
10-
templateUrl: "partials/partial2.html"
10+
templateUrl: "/static/partials/partial2.html"
1111
controller: MyCtrl2
1212

1313
$routeProvider.otherwise redirectTo: "/"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

public/app/index.html static/index.html

+14-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<title>alchemy</title>
6-
<link rel="stylesheet" href="css/app.css"/>
6+
<link rel="stylesheet" href="/static/css/app.css"/>
77
</head>
88
<body>
99
<!-- FB -->
@@ -12,7 +12,7 @@
1212
window.fbAsyncInit = function() {
1313
FB.init({
1414
appId : '413329972060392', // App ID
15-
channelUrl : '//tly.me/channel.html', // Channel File
15+
channelUrl : '/static/channel.html', // Channel File
1616
status : true, // check login status
1717
cookie : true, // enable cookies to allow the server to access the session
1818
xfbml : true // parse XFBML
@@ -53,13 +53,18 @@
5353
<!-- In production use:
5454
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
5555
-->
56-
<script src="lib/angular/angular.js"></script>
56+
<script src="https://api.filepicker.io/v0/filepicker.js"></script>
57+
<script src="/static/lib/angular/angular.js"></script>
5758
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
58-
<script src="js/app.js"></script>
59-
<script src="js/services.js"></script>
60-
<script src="js/controllers.js"></script>
61-
<script src="js/filters.js"></script>
62-
<script src="js/directives.js"></script>
63-
<script src="js/general.js"></script>
59+
<script src="/static/js/app.js"></script>
60+
<script src="/static/js/services.js"></script>
61+
<script src="/static/js/controllers.js"></script>
62+
<script src="/static/js/filters.js"></script>
63+
<script src="/static/js/directives.js"></script>
64+
<script src="/static/js/general.js"></script>
65+
<script type="text/javascript">
66+
//Seting up Filepicker.io with your api key
67+
filepicker.setKey('AsahPyP_yQs6krXInaLxHz');
68+
</script>
6469
</body>
6570
</html>

public/app/js/app.js static/js/app.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/controllers.js

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/directives.js

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

static/js/general.js

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/services.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

static/partials/filepicker.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//Use a drag drop widget
2+
<input type="filepicker-dragdrop"/>
3+
4+
//Or how about a save widget
5+
<button data-fp-mimetype="image/png"
6+
data-fp-url="http://www.filepicker.io/static/img/success.png">
7+
Save File</button>
File renamed without changes.
File renamed without changes.

api/test.txt test.txt

File renamed without changes.

update.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#! /bin/bash
22
git pull
3-
coffee -bc -o public/app/js/ public/app/coffee
3+
coffee -bc -o static/app/js/ static/app/coffee

0 commit comments

Comments
 (0)