diff --git a/gettingstarted/__init__.py b/gettingstarted/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/gettingstarted/settings.py b/gettingstarted/settings.py deleted file mode 100644 index 24b9558ec..000000000 --- a/gettingstarted/settings.py +++ /dev/null @@ -1,122 +0,0 @@ -""" -Django settings for gettingstarted project, on Heroku. Fore more info, see: -https://github.com/heroku/heroku-django-template - -For more information on this file, see -https://docs.djangoproject.com/en/1.8/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.8/ref/settings/ -""" - -import os -import dj_database_url - - -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -BASE_DIR = os.path.dirname(os.path.dirname(__file__)) - - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'i+acxn5(akgsn!sr4^qgf(^m&*@+g1@u^t@=8s@axc41ml*f=s' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -TEMPLATE_DEBUG = True - - -# Application definition - -INSTALLED_APPS = ( - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'hello' -) - -MIDDLEWARE_CLASSES = ( - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.middleware.security.SecurityMiddleware', -) - -ROOT_URLCONF = 'gettingstarted.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'gettingstarted.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/1.8/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } -} - -# Internationalization -# https://docs.djangoproject.com/en/1.8/topics/i18n/ - -LANGUAGE_CODE = 'en-us' -TIME_ZONE = 'UTC' -USE_I18N = True -USE_L10N = True -USE_TZ = True - - -# Parse database configuration from $DATABASE_URL -DATABASES['default'] = dj_database_url.config() - -# Enable Connection Pooling (if desired) -DATABASES['default']['ENGINE'] = 'django_postgrespool' - -# Honor the 'X-Forwarded-Proto' header for request.is_secure() -SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') - -# Allow all host headers -ALLOWED_HOSTS = ['*'] - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.8/howto/static-files/ - -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -STATIC_ROOT = 'staticfiles' -STATIC_URL = '/static/' - -STATICFILES_DIRS = ( - os.path.join(BASE_DIR, 'static'), -) - -# Simplified static file serving. -# https://warehouse.python.org/project/whitenoise/ -STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' - diff --git a/gettingstarted/static/humans.txt b/gettingstarted/static/humans.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/gettingstarted/urls.py b/gettingstarted/urls.py deleted file mode 100644 index 56e521f0e..000000000 --- a/gettingstarted/urls.py +++ /dev/null @@ -1,17 +0,0 @@ -from django.conf.urls import patterns, include, url - -from django.contrib import admin -admin.autodiscover() - -import hello.views - -urlpatterns = patterns('', - # Examples: - # url(r'^$', 'gettingstarted.views.home', name='home'), - # url(r'^blog/', include('blog.urls')), - - url(r'^$', hello.views.index, name='index'), - url(r'^db', hello.views.db, name='db'), - url(r'^admin/', include(admin.site.urls)), - -) diff --git a/gettingstarted/wsgi.py b/gettingstarted/wsgi.py deleted file mode 100644 index 620b37498..000000000 --- a/gettingstarted/wsgi.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -WSGI config for gettingstarted project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ -""" - -import os -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gettingstarted.settings") - -from django.core.wsgi import get_wsgi_application -from whitenoise.django import DjangoWhiteNoise - -application = get_wsgi_application() -application = DjangoWhiteNoise(application) \ No newline at end of file diff --git a/hello.py b/hello.py new file mode 100644 index 000000000..b5523d7c9 --- /dev/null +++ b/hello.py @@ -0,0 +1,8 @@ +import os +from flask import Flask + +app = Flask(__name__) + +@app.route('/') +def hello(): + return 'Hello World!' diff --git a/hello/__init__.py b/hello/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/hello/admin.py b/hello/admin.py deleted file mode 100644 index 8c38f3f3d..000000000 --- a/hello/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/hello/models.py b/hello/models.py deleted file mode 100644 index 89d76fd1b..000000000 --- a/hello/models.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.db import models - -# Create your models here. -class Greeting(models.Model): - when = models.DateTimeField('date created', auto_now_add=True) diff --git a/hello/static/lang-logo.png b/hello/static/lang-logo.png deleted file mode 100644 index f04aff1e3..000000000 Binary files a/hello/static/lang-logo.png and /dev/null differ diff --git a/hello/templates/base.html b/hello/templates/base.html deleted file mode 100644 index b3da1dbd7..000000000 --- a/hello/templates/base.html +++ /dev/null @@ -1,83 +0,0 @@ - - -
-
-
- This is a sample Python application deployed to Heroku. It's a reasonably simple app - but a good foundation for understanding how to get the most out of the Heroku platform.
- Getting Started with Python - Source on GitHub -