Coder Social home page Coder Social logo

rehabstudio / rehabstudio-gae-scaffold Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/gae-secure-scaffold-python

4.0 7.0 0.0 197 KB

License: Apache License 2.0

Python 81.57% Makefile 3.42% JavaScript 0.35% HTML 0.92% Smarty 13.74%

rehabstudio-gae-scaffold's Issues

Update documentation and examples

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.

Datastore in-context cache is not being cleared between tests

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))

Appengine SDK URL needs updated with each new release

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.

remote_api should be disabled on deploy

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.