What is GAE?
Google App Engine (often referred to as GAE or simply App Engine) is a platform as a service (PaaS) cloud computing platform for developing and hosting web applications in Google-managed data centers. Applications are sandboxed and run across multiple servers.App Engine offers automatic scaling for web applications—as the number of requests increases for an application, App Engine automatically allocates more resources for the web application to handle the additional demand.
We can upload any kind of web applications developed in any programming language like Java, Python, PHP.... etc.,Here in this blog let us see how to upload a simple Django application into the Google App Engine.
Simple procedure to upload a Simple django applicaion to GAE:
STEP 1:First create a simple PyDev Google App Engine Project by following the steps given below.
STEP 2:Creating a Django Project folder:
import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()
ROOT_URLCONF = 'Project_Name.urls'
application: django-demoapp version: 1 runtime: python27 api_version: 1 threadsafe: true handlers: - url: /.* script: main.application libraries: - name: django version: "1.4" env_variables: DJANGO_SETTINGS_MODULE: 'Project_Name.settings'
STEP 3:Creating your Django application folder:
Creating a Simple Application to show "Hello MicroPyramid"
To create our application, we would proceed with the following steps:
Create an application folder In the root project folder (together with main.py and manage.py and at the same level with Project_Name folder). A folder with an __init__.py is created as a result.
we will define our requierd views here.Here is the simple view that returns a simple Httpresponse to print "Hello MicroPyramid".
from django.http import HttpResponse def home(request): return HttpResponse("hello welcome to google app engine")
We would define a URL to serve the view home. We first modify the urls.py file in the Project_Name package to direct all requests to your application:
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^', include('firapp.urls')), )
We would then create another PyDev module urls (which is just a fileurls.py) in the firapp package to process all requests related to your application:
from django.conf.urls.defaults import * from firapp.views import home urlpatterns = patterns('', (r'^home/$', home), )
STEP 4:To Test Run Your Application
Our application would run on the bundled Google Appp Engine development server.
STEP 5:To Deploy Your Application
These steps would deploy your application to the real system.
Micropyramid is a software development and cloud consulting partner for enterprise businesses across the world. We work on python, Django, Salesforce, Angular, Reactjs, React Native, MySQL, PostgreSQL, Docker, Linux, Ansible, git, amazon web services. We are Amazon and salesforce consulting partner with 5 years of cloud architect experience. We develop e-commerce, retail, banking, machine learning, CMS, CRM web and mobile applications.
Django-CRM :Customer relationship management based on Django
Django-blog-it : django blog with complete customization and ready to use with one click installer Edit
Django-webpacker : A django compressor tool
Django-MFA : Multi Factor Authentication
Docker-box : Web Interface to manage full blown docker containers and imagesMore...