Permalink
Browse files

Add gitattributes

  • Loading branch information...
tghw committed Nov 7, 2012
1 parent 1866f38 commit bcf4ea93efb2161cef3295c64c9c1625b142a3dc
Showing with 1,480 additions and 1,466 deletions.
  1. +14 −0 .gitattributes
  2. +89 −89 app.yaml
  3. +29 −29 app/decorators.py
  4. +478 −478 app/models.py
  5. +85 −85 app/rpc.py
  6. +32 −32 bootstrap.py
  7. +160 −160 compress.py
  8. +177 −177 fabfile.py
  9. +47 −47 incoming_email_handler.py
  10. +223 −223 libs/livecount/counter.py
  11. +112 −112 libs/livecount/counter_admin.py
  12. +34 −34 settings.py
View
@@ -0,0 +1,14 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Standard to msysgit
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
View
178 app.yaml
@@ -1,89 +1,89 @@
-application: tghwputty
-version: 1
-runtime: python27
-threadsafe: yes
-api_version: 1
-default_expiration: "365d"
-
-inbound_services:
-- mail
-- channel_presence
-- warmup
-
-handlers:
-
-- url: /favicon\.ico
- static_files: static/img/favicon.ico
- upload: static/img/favicon\.ico
- mime_type: image/x-icon
-
-- url: /respond-proxy\.html
- static_files: static/respond/respond-proxy.html
- upload: static/respond/respond-proxy\.html
-
-- url: /static/img/(.*\.(gif|png|jpg))
- static_files: static/img/\1
- upload: static/img/(.*\.(gif|png|jpg))
-
-- url: /static/img/docs/(.*\.(gif|png|jpg))
- static_files: static/img/docs/\1
- upload: static/img/docs/(.*\.(gif|png|jpg))
-
-- url: /static/css/(.*\.css)
- mime_type: text/css
- static_files: static/css/\1
- upload: static/css/(.*\.css)
-
-- url: /static/js/(.*\.js)
- mime_type: text/javascript
- static_files: static/js/\1
- upload: static/js/(.*\.js)
-
-- url: /static/codemirror/(.*\.css)
- mime_type: text/css
- static_files: static/codemirror/\1
- upload: static/codemirror/(.*\.css)
-
-- url: /static/codemirror/(.*\.js)
- mime_type: text/javascript
- static_files: static/codemirror/\1
- upload: static/codemirror/(.*\.js)
-
-- url: /_ah/mail/.+
- script: incoming_email_handler.application
- login: admin
-
-- url: /_migrate
- script: bootstrap.app
- login: admin
-
-- url: /gae_mini_profiler/static/js/(.*\.tmpl)
- mime_type: text/html
- static_files: libs/gae_mini_profiler/static/js/\1
- upload: libs/gae_mini_profiler/static/js/(.*\.tmpl)
-
-- url: /gae_mini_profiler/static
- static_dir: libs/gae_mini_profiler/static
-
-- url: /gae_mini_profiler/.*
- script: libs.gae_mini_profiler.main.app
-
-- url: /livecount/counter_admin
- script: libs.livecount.counter_admin.application
- login: admin
-
-- url: /livecount/.*
- script: libs.livecount.counter.application
- login: admin
-
-- url: /tasks/.*
- script: bootstrap.app
- login: admin
-
-- url: .*\.(jpg|gif|png)
- static_files: static/img/404.png
- upload: static/img/404.png
-
-- url: .*
- script: bootstrap.app
-
+application: tghwputty
+version: 1
+runtime: python27
+threadsafe: yes
+api_version: 1
+default_expiration: "365d"
+
+inbound_services:
+- mail
+- channel_presence
+- warmup
+
+handlers:
+
+- url: /favicon\.ico
+ static_files: static/img/favicon.ico
+ upload: static/img/favicon\.ico
+ mime_type: image/x-icon
+
+- url: /respond-proxy\.html
+ static_files: static/respond/respond-proxy.html
+ upload: static/respond/respond-proxy\.html
+
+- url: /static/img/(.*\.(gif|png|jpg))
+ static_files: static/img/\1
+ upload: static/img/(.*\.(gif|png|jpg))
+
+- url: /static/img/docs/(.*\.(gif|png|jpg))
+ static_files: static/img/docs/\1
+ upload: static/img/docs/(.*\.(gif|png|jpg))
+
+- url: /static/css/(.*\.css)
+ mime_type: text/css
+ static_files: static/css/\1
+ upload: static/css/(.*\.css)
+
+- url: /static/js/(.*\.js)
+ mime_type: text/javascript
+ static_files: static/js/\1
+ upload: static/js/(.*\.js)
+
+- url: /static/codemirror/(.*\.css)
+ mime_type: text/css
+ static_files: static/codemirror/\1
+ upload: static/codemirror/(.*\.css)
+
+- url: /static/codemirror/(.*\.js)
+ mime_type: text/javascript
+ static_files: static/codemirror/\1
+ upload: static/codemirror/(.*\.js)
+
+- url: /_ah/mail/.+
+ script: incoming_email_handler.application
+ login: admin
+
+- url: /_migrate
+ script: bootstrap.app
+ login: admin
+
+- url: /gae_mini_profiler/static/js/(.*\.tmpl)
+ mime_type: text/html
+ static_files: libs/gae_mini_profiler/static/js/\1
+ upload: libs/gae_mini_profiler/static/js/(.*\.tmpl)
+
+- url: /gae_mini_profiler/static
+ static_dir: libs/gae_mini_profiler/static
+
+- url: /gae_mini_profiler/.*
+ script: libs.gae_mini_profiler.main.app
+
+- url: /livecount/counter_admin
+ script: libs.livecount.counter_admin.application
+ login: admin
+
+- url: /livecount/.*
+ script: libs.livecount.counter.application
+ login: admin
+
+- url: /tasks/.*
+ script: bootstrap.app
+ login: admin
+
+- url: .*\.(jpg|gif|png)
+ static_files: static/img/404.png
+ upload: static/img/404.png
+
+- url: .*
+ script: bootstrap.app
+
View
@@ -1,29 +1,29 @@
-import json
-from functools import wraps
-from flask import Response, redirect, request
-from google.appengine.api import users
-
-def requires_auth(func):
- @wraps(func)
- def wrapper(*args, **kwargs):
- if not users.get_current_user():
- return redirect(users.create_login_url(request.path))
- return func(*args, **kwargs)
- return wrapper
-
-def requires_admin(func):
- @wraps(func)
- def wrapper(*args, **kwargs):
- if not users.get_current_user() or not users.is_current_user_admin():
- return redirect(users.create_login_url(request.path))
- return func(*args, **kwargs)
- return wrapper
-
-def as_json(func):
- @wraps(func)
- def wrapper(*args, **kwargs):
- res = func(*args, **kwargs)
- if isinstance(res, Response):
- return res
- return json.dumps(res)
- return wrapper
+import json
+from functools import wraps
+from flask import Response, redirect, request
+from google.appengine.api import users
+
+def requires_auth(func):
+ @wraps(func)
+ def wrapper(*args, **kwargs):
+ if not users.get_current_user():
+ return redirect(users.create_login_url(request.path))
+ return func(*args, **kwargs)
+ return wrapper
+
+def requires_admin(func):
+ @wraps(func)
+ def wrapper(*args, **kwargs):
+ if not users.get_current_user() or not users.is_current_user_admin():
+ return redirect(users.create_login_url(request.path))
+ return func(*args, **kwargs)
+ return wrapper
+
+def as_json(func):
+ @wraps(func)
+ def wrapper(*args, **kwargs):
+ res = func(*args, **kwargs)
+ if isinstance(res, Response):
+ return res
+ return json.dumps(res)
+ return wrapper
Oops, something went wrong.

0 comments on commit bcf4ea9

Please sign in to comment.