From f2e49ebc633ebb82b71bddc754dbc5eb3451dbe4 Mon Sep 17 00:00:00 2001 From: Jon Mountjoy Date: Tue, 21 Apr 2015 09:17:08 +0100 Subject: [PATCH 001/201] use 2.7.9 and not 2.7.8 --- runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime.txt b/runtime.txt index 42635116f..c47075b0d 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-2.7.8 +python-2.7.9 From 9ade8e415d360872c873a08f915bf522aac36de3 Mon Sep 17 00:00:00 2001 From: Jon Mountjoy Date: Tue, 21 Apr 2015 09:36:23 +0100 Subject: [PATCH 002/201] upgrade Django version and other dependencies --- requirements.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 983420ebf..562cc158e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,4 @@ -Django==1.6.5 -dj-database-url==0.3.0 -dj-static==0.0.6 +Django==1.8 django-toolbelt==0.0.1 -gunicorn==19.0.0 -psycopg2==2.5.3 static3==0.5.1 wsgiref==0.1.2 From 50e48ae5e467f8b907dc5b16e2682d8083c5839a Mon Sep 17 00:00:00 2001 From: Jon Mountjoy Date: Tue, 21 Apr 2015 10:35:07 +0100 Subject: [PATCH 003/201] add Windows Procfile --- Procfile.windows | 1 + 1 file changed, 1 insertion(+) create mode 100644 Procfile.windows diff --git a/Procfile.windows b/Procfile.windows new file mode 100644 index 000000000..69789e554 --- /dev/null +++ b/Procfile.windows @@ -0,0 +1 @@ +web: python manage.py runserver 0.0.0.0:5000 From 7312b0a3c28bf42612bdab35fb7f2ab67e864de6 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Wed, 29 Apr 2015 14:16:04 +0200 Subject: [PATCH 004/201] Add new line at EOF --- gettingstarted/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gettingstarted/settings.py b/gettingstarted/settings.py index eb55cf4d6..5e2c8ca4b 100644 --- a/gettingstarted/settings.py +++ b/gettingstarted/settings.py @@ -102,4 +102,4 @@ STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), -) \ No newline at end of file +) From 236784a418c2dfe62c1800cf59dbe6234677e5a7 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Wed, 29 Apr 2015 14:16:52 +0200 Subject: [PATCH 005/201] Use SQLite when DATABASE_URL is not set --- .gitignore | 1 + gettingstarted/settings.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 87f7164da..f95d164a6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ venv *.pyc staticfiles .env +db.sqlite3 diff --git a/gettingstarted/settings.py b/gettingstarted/settings.py index 5e2c8ca4b..43bc224f0 100644 --- a/gettingstarted/settings.py +++ b/gettingstarted/settings.py @@ -87,7 +87,9 @@ # Parse database configuration from $DATABASE_URL -DATABASES['default'] = dj_database_url.config() +db_config = dj_database_url.config() +if db_config: + DATABASES['default'] = db_config # Honor the 'X-Forwarded-Proto' header for request.is_secure() SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') From 87258e4a1793ead17164167d7fb17d6788013514 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Wed, 29 Apr 2015 14:19:14 +0200 Subject: [PATCH 006/201] Replace syncdb with migrate --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fb87099fc..0bc92d0b3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Make sure you have Python [installed properly](http://install.python-guide.org). $ git clone git@github.com:heroku/python-getting-started.git $ cd python-getting-started $ pip install -r requirements.txt -$ python manage.py syncdb +$ python manage.py migrate $ foreman start web ``` @@ -23,7 +23,7 @@ Your app should now be running on [localhost:5000](http://localhost:5000/). ```sh $ heroku create $ git push heroku master -$ heroku run python manage.py syncdb +$ heroku run python manage.py migrate $ heroku open ``` From ff69f09e58e6439833a5eb3ea6e90366bd71b0f3 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Wed, 29 Apr 2015 14:47:38 +0200 Subject: [PATCH 007/201] Remove duplication in database settings --- gettingstarted/settings.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/gettingstarted/settings.py b/gettingstarted/settings.py index 43bc224f0..e8c50a732 100644 --- a/gettingstarted/settings.py +++ b/gettingstarted/settings.py @@ -59,11 +59,10 @@ # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases +# Parse database configuration from $DATABASE_URL + DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } + 'default': dj_database_url.config(default='sqlite:///'+os.path.join(BASE_DIR, 'db.sqlite3')) } # Internationalization @@ -85,12 +84,6 @@ STATIC_URL = '/static/' - -# Parse database configuration from $DATABASE_URL -db_config = dj_database_url.config() -if db_config: - DATABASES['default'] = db_config - # Honor the 'X-Forwarded-Proto' header for request.is_secure() SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') From 018e127eaaabd9c8424ef2117a3563db042aef15 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 May 2015 18:27:28 +0200 Subject: [PATCH 008/201] use whitenoise --- requirements.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 562cc158e..e7dc8a072 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -Django==1.8 -django-toolbelt==0.0.1 -static3==0.5.1 -wsgiref==0.1.2 +Django==1.8.1 +gunicorn==19.3.0 +whitenoise==1.0.6 From 9db30687a55e075910af9b3bbdf97ee5b529cbc9 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 May 2015 18:40:42 +0200 Subject: [PATCH 009/201] add psycopg2 --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index e7dc8a072..bf517a800 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ Django==1.8.1 gunicorn==19.3.0 +psycopg2==2.6 whitenoise==1.0.6 From 592dd43bd9c250f304219dcac9a91090298d67c5 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 May 2015 18:40:49 +0200 Subject: [PATCH 010/201] update wsgi.py to use whitenoise --- gettingstarted/wsgi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gettingstarted/wsgi.py b/gettingstarted/wsgi.py index 9d84ed53b..620b37498 100644 --- a/gettingstarted/wsgi.py +++ b/gettingstarted/wsgi.py @@ -11,6 +11,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gettingstarted.settings") from django.core.wsgi import get_wsgi_application -from dj_static import Cling +from whitenoise.django import DjangoWhiteNoise -application = Cling(get_wsgi_application()) \ No newline at end of file +application = get_wsgi_application() +application = DjangoWhiteNoise(application) \ No newline at end of file From b8aee320aa9d61cf3a6965381fea91a3d0bf95a4 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 May 2015 18:41:55 +0200 Subject: [PATCH 011/201] dj-database-url --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index bf517a800..39fe46d71 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +dj-database-url==0.3.0 Django==1.8.1 gunicorn==19.3.0 psycopg2==2.6 From b5b05dfa991e68558ac286b77b67edbd583012e9 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 May 2015 18:57:54 +0200 Subject: [PATCH 012/201] django-postgrespool --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 39fe46d71..4625c6194 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,7 @@ dj-database-url==0.3.0 Django==1.8.1 +django-postgrespool==0.3.0 gunicorn==19.3.0 psycopg2==2.6 +SQLAlchemy==1.0.4 whitenoise==1.0.6 From 2e07fa5119d4d9ae0c4de471cebeaa794e34bb94 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 May 2015 18:58:14 +0200 Subject: [PATCH 013/201] update settings.py --- gettingstarted/settings.py | 41 +++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/gettingstarted/settings.py b/gettingstarted/settings.py index e8c50a732..746541224 100644 --- a/gettingstarted/settings.py +++ b/gettingstarted/settings.py @@ -12,23 +12,22 @@ 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.6/howto/deployment/checklist/ +# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -DEFAULT_SECRET_KEY = '3iy-!-d$!pc_ll$#$elg&cpr@*tfn-d5&n9ag=)%#()t$$5%5^' -SECRET_KEY = os.environ.get('SECRET_KEY', DEFAULT_SECRET_KEY) +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 -ALLOWED_HOSTS = [] - # Application definition @@ -47,6 +46,7 @@ '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', ) @@ -57,32 +57,30 @@ # Database -# https://docs.djangoproject.com/en/1.6/ref/settings/#databases - -# Parse database configuration from $DATABASE_URL +# https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { - 'default': dj_database_url.config(default='sqlite:///'+os.path.join(BASE_DIR, 'db.sqlite3')) + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } } # Internationalization -# https://docs.djangoproject.com/en/1.6/topics/i18n/ +# https://docs.djangoproject.com/en/1.7/topics/i18n/ LANGUAGE_CODE = 'en-us' - TIME_ZONE = 'UTC' - USE_I18N = True - USE_L10N = True - USE_TZ = True -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.6/howto/static-files/ +# Parse database configuration from $DATABASE_URL +DATABASES['default'] = dj_database_url.config() -STATIC_URL = '/static/' +# 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') @@ -90,7 +88,9 @@ # Allow all host headers ALLOWED_HOSTS = ['*'] -# Static asset configuration +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.7/howto/static-files/ + BASE_DIR = os.path.dirname(os.path.abspath(__file__)) STATIC_ROOT = 'staticfiles' STATIC_URL = '/static/' @@ -98,3 +98,8 @@ STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) + +# Simplified static file serving. +# https://warehouse.python.org/project/whitenoise/ +STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' + From 6f4f2eb2a655fbbdba9bdc716c9d08dcb83858f9 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 May 2015 19:06:42 +0200 Subject: [PATCH 014/201] update getting started settings for 1.8 --- gettingstarted/settings.py | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/gettingstarted/settings.py b/gettingstarted/settings.py index 746541224..52e4be85e 100644 --- a/gettingstarted/settings.py +++ b/gettingstarted/settings.py @@ -1,11 +1,12 @@ """ -Django settings for gettingstarted project. +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.6/topics/settings/ +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.6/ref/settings/ +https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) @@ -18,7 +19,7 @@ # Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ +# 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' @@ -49,15 +50,32 @@ '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.7/ref/settings/#databases +# https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { 'default': { @@ -67,7 +85,7 @@ } # Internationalization -# https://docs.djangoproject.com/en/1.7/topics/i18n/ +# https://docs.djangoproject.com/en/1.8/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' @@ -89,7 +107,7 @@ ALLOWED_HOSTS = ['*'] # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.7/howto/static-files/ +# https://docs.djangoproject.com/en/1.8/howto/static-files/ BASE_DIR = os.path.dirname(os.path.abspath(__file__)) STATIC_ROOT = 'staticfiles' From 5f86e082b82bf94b9dcff17d26cc10b617ff536b Mon Sep 17 00:00:00 2001 From: Jon Mountjoy Date: Fri, 15 May 2015 12:50:04 +0100 Subject: [PATCH 015/201] first pass at adding the UI. Still needs jQuery and fix for assets --- hello/static/lang-logo.png | Bin 0 -> 1749 bytes hello/templates/base.html | 45 ++++++++++++++++++++++++++++++++++ hello/templates/index.html | 48 +++++++++++++++++++++++++++++++++++++ hello/views.py | 3 ++- 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 hello/static/lang-logo.png create mode 100644 hello/templates/base.html create mode 100644 hello/templates/index.html diff --git a/hello/static/lang-logo.png b/hello/static/lang-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..96fe00d2853bbab6382ae16b5512e2fbb4236013 GIT binary patch literal 1749 zcmV;`1}gc9P)#;e$000J@Nkl@mo0&n%!P%p6B%s6SJ(==^N=(a207w)zy$UT?7`D;8JgfcG@ut- zu>(6*X{ReMoX2`>AvpyluyAXC8}Zz!um#U>tWNzx?>Dg>?o?Y4**a*%W+QkSX~qj| zp7l!Jf|pDJ`oxPbTic6EXnb|XF7Ui%hy?>l(b}dO@q)%wjL1cKidCx4BwO`0(}Gnj z2Oq_9Q$5*^M=XLw=5MAIJ6%0g^u2h|1ZJa@ZVhBbz@12AeRo|w%#2fLVXs;P`E#Hr zb9-y}DKib2sk|0s~`ZrBqf#cU&FNXgMudI!|vMVe7Mtri6mvqC=kn=SUm zSfNZqf+p+nqCxVfyR{*V7O?;?+l8owgpWPbgs{hOH6Br;q#dCQW#g5}UrhAmo541L z>(ncf&_vFOtDx1bzdepr)YB>*Hnd6qxfr@gh$ zZp0wN+1VX(^8oH=S_=lMH>70y9FIoI$)7CcN_B_yHGBE91-{Fv_A6T`88&c`_N48dFZvtz!?{c-5WCU+`JQL1y$UU*$7$jqKR=<5&( zp9AY`M{EX}G&rC4)xofN{?~jkOy?n4%*8z8%0ADAO38SVpDzmwS;!$*D3D`leAo;r zPojQY%MpKf^$81^&EMFiIPxhJHQLvQ6vD7E1n{654rWIP8>jF$KDBqYxkUBMGU+C2 z^FBILkUwxZ!$V5x{GCcg-8trJ5cE|&Hc@|c=#VyOfL~z?+(`{OY1Kl6gf*(=hEw+t z{?;kwbhS~#p(dKJg5^*?Gel=j;_olG2ftH)=eTEdz66 zeT2JG3}=QB>xQWgM^PGlWZJsVFt!`|G6J4Mh z_QNh%@0lDS3+$fIjN@%oD2f~QdZW&%4Cqg~5znbbze2^CSb4~^G=ZP-VV3@82| z<_SgZmao3$@wV~=WR)(rQ$z}QT%5xMJ619A5T8P4hzpO7ibVsTZx3+D^>!d`?a%%9 zC3OKhXr(Lclt%9j!ZyAFlVZzydIs;1Z`8~D;X2%T9VvTaJ<^duuFStRI^gy)wMGZkd5|kQQyJ-EKKTPvO4uY0Mf^;Q`sGZFT9;Rhc zil4SZ!i&7k(_Lyop3zZUx{Z*Y$s)yuMcu9Gg+zdKr&1M&cNZK8InTq}5qeV}q?0X% zgHUT$H2(Tz{_t=%^%@oP+s#9=RaYoos|brI#shpy72ob_2*>q6#=d3-|4^YSD^hyq z3pTHX`LG56w)>@6nYp7w@<_eaooZIPShFbys}s@@&qIg0l_{YO*6I;?RJoG6N#P-buh?g`qVwwUgG&mnKIM%^Ptxhd+(e(+bNL5?R^tU35s z6)cFDD|v6MGW5+#ZMkaONLa(qzqBr_Unp{Ld6uC)9i?iC@EknF9#Et1xz r0IByZ4TUQBoUUYif_9TTV{hSKu`#E20|^0N00000NkvXXu0mjf&B8qc literal 0 HcmV?d00001 diff --git a/hello/templates/base.html b/hello/templates/base.html new file mode 100644 index 000000000..37f6c76ca --- /dev/null +++ b/hello/templates/base.html @@ -0,0 +1,45 @@ + + + +GettingStarted + + + + + + +{% block content %}{% endblock %} + + + diff --git a/hello/templates/index.html b/hello/templates/index.html new file mode 100644 index 000000000..0ad4821d6 --- /dev/null +++ b/hello/templates/index.html @@ -0,0 +1,48 @@ +{% 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 Gemfile.
  • +
  • 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/views.py b/hello/views.py index 3862c1bf4..8558d8451 100644 --- a/hello/views.py +++ b/hello/views.py @@ -5,7 +5,8 @@ # Create your views here. def index(request): - return HttpResponse('Hello from Python!') + # return HttpResponse('Hello from Python!') + return render(request, 'index.html') def db(request): From 9cc0d84e93360cc9cb416b61b0633baba5a731ae Mon Sep 17 00:00:00 2001 From: Nick Tassone Date: Fri, 15 May 2015 09:40:57 -0400 Subject: [PATCH 016/201] updated language logo for new ui --- hello/static/lang-logo.png | Bin 1749 -> 2217 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/hello/static/lang-logo.png b/hello/static/lang-logo.png index 96fe00d2853bbab6382ae16b5512e2fbb4236013..f04aff1e38eeaeadba93390eb5cd356388b8a9f7 100644 GIT binary patch literal 2217 zcmaJ@c~}!?8V{ES5J5Ras&x#4Sjb5@5(!5xzz~)VpeP8&WPm)7Og4-ru!tat1eHTn zltSYHA_!`w93BV~D@C_zU8Rby1Vxl08WH5yPAJ%Y_HjEi-+bTu&ii}c-+TNq%8+1x zGZQ-#6bfY)7{KHqyHK~#^N_dn*`Y9GTMDxx;7}+Qmh)vG%1;Pw1%W^@KMv%9d|~oG zIzTTJ%D_n!76C_agQx;XjN|KUa0;;$L8DM!J_;#ckO0EKRxnN^p<&)$ZovQ|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654rWIP8>jF$KDBqYxkUBMGU+C2 z^FBILkUwxZ!$V5x{GCcg-8trJ5cE|&Hc@|c=#VyOfL~z?+(`{OY1Kl6gf*(=hEw+t z{?;kwbhS~#p(dKJg5^*?Gel=j;_olG2ftH)=eTEdz66 zeT2JG3}=QB>xQWgM^PGlWZJsVFt!`|G6J4Mh z_QNh%@0lDS3+$fIjN@%oD2f~QdZW&%4Cqg~5znbbze2^CSb4~^G=ZP-VV3@82| z<_SgZmao3$@wV~=WR)(rQ$z}QT%5xMJ619A5T8P4hzpO7ibVsTZx3+D^>!d`?a%%9 zC3OKhXr(Lclt%9j!ZyAFlVZzydIs;1Z`8~D;X2%T9VvTaJ<^duuFStRI^gy)wMGZkd5|kQQyJ-EKKTPvO4uY0Mf^;Q`sGZFT9;Rhc zil4SZ!i&7k(_Lyop3zZUx{Z*Y$s)yuMcu9Gg+zdKr&1M&cNZK8InTq}5qeV}q?0X% zgHUT$H2(Tz{_t=%^%@oP+s#9=RaYoos|brI#shpy72ob_2*>q6#=d3-|4^YSD^hyq z3pTHX`LG56w)>@6nYp7w@<_eaooZIPShFbys}s@@&qIg0l_{YO*6I;?RJoG6N#P-buh?g`qVwwUgG&mnKIM%^Ptxhd+(e(+bNL5?R^tU35s z6)cFDD|v6MGW5+#ZMkaONLa(qzqBr_Unp{Ld6uC)9i?iC@EknF9#Et1xz r0IByZ4TUQBoUUYif_9TTV{hSKu`#E20|^0N00000NkvXXu0mjf&B8qc From c9a7961c259c2dc4e2c879742b6b8db219977d3b Mon Sep 17 00:00:00 2001 From: Rhys Elsmore Date: Thu, 25 Jun 2015 18:35:18 +1000 Subject: [PATCH 017/201] improved setup doc, improved env var --- .env | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index fdb7836ac..ef4b1a332 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -DATABASE_URL=postgres://localhost/python_getting_started +DATABASE_URL=postgres:///python_getting_started diff --git a/README.md b/README.md index 0bc92d0b3..57119410b 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,14 @@ This application support the [Getting Started with Python on Heroku](https://dev ## Running Locally -Make sure you have Python [installed properly](http://install.python-guide.org). Also, install the [Heroku Toolbelt](https://toolbelt.heroku.com/). +Make sure you have Python [installed properly](http://install.python-guide.org). Also, install the [Heroku Toolbelt](https://toolbelt.heroku.com/) and [Postgres](https://devcenter.heroku.com/articles/heroku-postgresql#local-setup). ```sh $ git clone git@github.com:heroku/python-getting-started.git $ cd python-getting-started $ pip install -r requirements.txt -$ python manage.py migrate +$ createdb python_getting_started +$ foreman run python manage.py migrate $ foreman start web ``` @@ -32,4 +33,3 @@ $ heroku open For more information about using Python on Heroku, see these Dev Center articles: - [Python on Heroku](https://devcenter.heroku.com/categories/python) - From 6a1faeee8ae891b853121c9a7726d6559455007d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 25 Jun 2015 06:12:06 -0400 Subject: [PATCH 018/201] add jquery --- hello/templates/base.html | 1 + 1 file changed, 1 insertion(+) diff --git a/hello/templates/base.html b/hello/templates/base.html index 37f6c76ca..6d08d4ce6 100644 --- a/hello/templates/base.html +++ b/hello/templates/base.html @@ -4,6 +4,7 @@ GettingStarted +