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
fs = require 'fs' | |
path = require 'path' | |
util = require 'util' | |
wrench = require 'wrench' | |
{exec, spawn} = require 'child_process' | |
fixpath = (fragments...) => | |
return path.normalize(path.join(fragments...)) | |
defaults = |
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 sys | |
if 'lib' not in sys.path: | |
# Add lib as primary libraries directory, with fallback to lib/dist | |
# and optionally to lib/dist.zip, loaded using zipimport. | |
sys.path[0:0] = ['lib', 'lib/dist', 'lib/dist.zip'] | |
class AppBootstrapper(object): |
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 protorpc import messages | |
class GetContentRequest(messages.Message): | |
''' Retrieve a content snippet. ''' | |
snippet_key = messages.StringField(1) | |
snippet_keyname = messages.StringField(2) |
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 sys | |
if 'lib' not in sys.path: | |
# Add lib as primary libraries directory, with fallback to lib/dist | |
# and optionally to lib/dist.zip, loaded using zipimport. | |
sys.path[0:0] = ['lib', 'lib/dist', 'lib/dist.zip'] | |
class AppBootstrapper(object): |
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 hashlib | |
from protorpc import remote | |
from protorpc import message_types | |
from apptools import BaseService | |
from apptools.services import RequestError | |
from project.messages import content as messages |
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
############################################################ | |
# AppEngine Toolkit - Buildout Configuration # | |
# ================================================== # | |
# DIRECTIONS: To automatically install libs from PYPI # | |
# (http://pypi.python.org), add the lib name to the # | |
# "eggs" entry in the 'app_lib' section. # | |
# # | |
# AN (INCOMPLETE) SELECTION OF USEFUL LIBS: # | |
# geomodel - For working with geospatial data # | |
# html5lib - Python parser for HTML5, full DOM # |
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
fs = require 'fs' | |
path = require 'path' | |
util = require 'util' | |
wrench = require 'wrench' | |
{exec, spawn} = require 'child_process' | |
fixpath = (fragments...) => | |
return path.normalize(path.join(fragments...)) | |
defaults = |
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
#topbox | |
.nav | |
li | |
a.href | |
#nav2 | |
.menu2 | |
li.sub1 | |
ul | |
li.sub2 |
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
#### +=+=+=+ Service Layer Mixins +=+=+=+ #### | |
class MessageConverterMixin(ModelMixin): | |
''' Mixin class for automagically generating a ProtoRPC Message class from a model. ''' | |
def to_message(self, include=None, exclude=None): | |
response = self._message_class() | |
if self.key is not None: | |
response.key = self.key.urlsafe() |
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
fs = require 'fs' | |
path = require 'path' | |
util = require 'util' | |
wrench = require 'wrench' | |
{exec, spawn} = require 'child_process' | |
fixpath = (fragments...) => | |
return path.normalize(path.join(fragments...)) | |
defaults = |