rehabstudio / rehabstudio-gae-scaffold Goto Github PK
View Code? Open in Web Editor NEWThis project forked from google/gae-secure-scaffold-python
License: Apache License 2.0
This project forked from google/gae-secure-scaffold-python
License: Apache License 2.0
There have been a few small updates to the original scaffold that need merged in, notably this commit google@f12a7b6
Some security updates which need to be added
A script should be provided that will download the latest version of the SDK on an initial docker build
regardless of what the latest released version is.
Still undecided if the version, once downloaded, should be locked for the lifetime of the project (with a ruby gems style lock file that can be edited manually if necessary.
We currently use the remote_api setting to enable the use of a python shell when running locally. We should come up with a nice method of disabling this on deploy (but not locally as we still need it).
I have some docs on adding i18n support which should hopefully save people some time in the future if they need to implement it.
We should also move the example handlers into an examples folder to make it faster to get up and running when cloning the scaffold.
This seems to be a side-effect of how the session key is generated and saved to the datastore in GetApplicationConfiguration
. To reproduce, remove any existing test code in app/tests/base
and run the following test case on its own:
from google.appengine.ext import ndb
from tests.testcases import BaseTestCase
# This import (unused in this particular test case) is found in many
# of the test modules already present in app/tests/base. It appears
# that the call to GetApplicationConfiguration within app/config.py
# causes the bug. Remove this import to see that the problem is
# resolved.
from app import config
class MyModel(ndb.Model):
value = ndb.StringProperty()
class ExampleTestCase(BaseTestCase):
def test_1_model_is_created(self):
""" Persist an object in the datastore with and ID of 1234.
"""
m = MyModel(id=1234, value='foobar')
m.put()
self.assertEqual(len(MyModel.query().fetch()), 1)
def test_2_model_no_longer_exists(self):
""" Assert that the datastore is reset from the previous test
run and that object 1234 is no longer present in the datastore.
"""
self.assertEqual(len(MyModel.query().fetch()), 0)
# This assertion will fail even though the datastore is shown
# to be reset in the previous assertion. This hints that the
# datastore's in-context cache is not being cleared.
self.assertIsNone(MyModel.get_by_id(1234))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.