Giter VIP home page Giter VIP logo

potato-chips's Introduction

##A streamlined Django and App Engine integration.

Run locally:

git clone [email protected]:potatolondon/djappengine.git
cd djappengine
dev_appserver .

Visit http://localhost:8000 to marvel at your work.

Now deploy to appspot, first set up an app on http://appengine.google.com and replace application in app.yaml with the name of your app (in your text editor or like this):

sed -i '' 's/djappeng1ne/myappid/' app.yaml

You're ready to deploy:

appcfg.py update .

The Django app in core is there to get you started. Have a look around.

##Running tests

python manage.py test core
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

djappengine uses a custom test runner that doesn't try to use a database. This is because djappengine is designed primarily to be used with App Engine's models, and not with Django's ORM. If you're using CloudSQL, comment out the TEST_RUNNER line in settings.py.

core/tests.py is an example test that sets App Engine's testbed.

So what's going on?

app.yaml

  • Sets up static resources
  • Points all other paths to the WSGI app

main.py

  • Sets up env variables and the path
  • Determines if we're running locally
  • Routes logging for production
  • Defines the WSGI app

manage.py

  • Friendly reminder not to use runserver, use dev_appserver.py for now
  • Sorts out paths using dev_appserver

settings.py

  • Sets up caching
  • Sets up sessions

urls.py

  • Just points to core’s url config

lib/pypath.py

  • Uses dev_appserver to set up the python path

lib/memcache.py

  • So App Engine's memcache is seen by django

lib/testrunnernodb.py

  • A custom test runner that lets you use Djanog's simple test runner to run tests with App Engine's testbed and without a database.

core

  • A simple example app to get you started

What's missing

[Something missing? please raise an issue.

potato-chips's People

Contributors

grzes avatar

Watchers

 avatar  avatar

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.