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 @@ - - - -GettingStarted - - - - - - - - -{% block content %}{% endblock %} - - - diff --git a/hello/templates/db.html b/hello/templates/db.html deleted file mode 100644 index e0e03d4c6..000000000 --- a/hello/templates/db.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} - -{% block content %} -
- - -

Page View Report

- - - - -
- -{% endblock %} \ No newline at end of file diff --git a/hello/templates/index.html b/hello/templates/index.html deleted file mode 100644 index 23eb9d16c..000000000 --- a/hello/templates/index.html +++ /dev/null @@ -1,48 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} - -{% block content %} - -
-
- -

Getting Started with Python on Heroku

-

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

How this sample app works

-
    -
  • This app was deployed to Heroku, either using Git or by using Heroku Button on the repository.
  • - -
  • When Heroku received the source code, it grabbed all the dependencies in the requirements.txt file.
  • -
  • The platform then spins up a dyno, a lightweight container that provides an isolated environment in which the slug can be mounted and executed.
  • -
  • You can scale your app, manage it, and deploy over 150 add-on services, from the Dashboard or CLI.
  • -
  • Check out the Getting Started guide to learn more!
  • -
-
- -
- -
-{% endblock %} \ No newline at end of file diff --git a/hello/tests.py b/hello/tests.py deleted file mode 100644 index 7ce503c2d..000000000 --- a/hello/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/hello/views.py b/hello/views.py deleted file mode 100644 index 8558d8451..000000000 --- a/hello/views.py +++ /dev/null @@ -1,20 +0,0 @@ -from django.shortcuts import render -from django.http import HttpResponse - -from .models import Greeting - -# Create your views here. -def index(request): - # return HttpResponse('Hello from Python!') - return render(request, 'index.html') - - -def db(request): - - greeting = Greeting() - greeting.save() - - greetings = Greeting.objects.all() - - return render(request, 'db.html', {'greetings': greetings}) - diff --git a/manage.py b/manage.py deleted file mode 100755 index eb3ab8af5..000000000 --- a/manage.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gettingstarted.settings") - - from django.core.management import execute_from_command_line - - execute_from_command_line(sys.argv) diff --git a/requirements.txt b/requirements.txt index 4625c6194..083082c27 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ gunicorn==19.3.0 psycopg2==2.6 SQLAlchemy==1.0.4 whitenoise==1.0.6 +nose>=1.3.0