diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b0d3929 --- /dev/null +++ b/Makefile @@ -0,0 +1,3 @@ +run: + heroku local & + lt -p 5000 \ No newline at end of file diff --git a/Pipfile b/Pipfile index 4521951..ad162d0 100644 --- a/Pipfile +++ b/Pipfile @@ -10,6 +10,7 @@ name = "pypi" django = ">=2.0" "psycopg2" = "*" gunicorn = "*" +dj-database-url = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index ff67180..5e7898a 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "9ca89c48c5bde781eee3631ee5748dd3bd00eb64b17a33637106804469cfb817" + "sha256": "9fb9e609349b328fe1246414709266a39ab7efd41ba133bfda4076c00b39c133" }, "host-environment-markers": { "implementation_name": "cpython", @@ -27,6 +27,13 @@ ] }, "default": { + "dj-database-url": { + "hashes": [ + "sha256:e16d94c382ea0564c48038fa7fe8d9c890ef1ab1a8ec4cb48e732c124b9482fd", + "sha256:a6832d8445ee9d788c5baa48aef8130bf61fdc442f7d9a548424d25cd85c9f08" + ], + "version": "==0.4.2" + }, "django": { "hashes": [ "sha256:af18618ce3291be5092893d8522fe3919661bf3a1fb60e3858ae74865a4f07c2", diff --git a/core/__init__.py b/richtext/core/__init__.py similarity index 100% rename from core/__init__.py rename to richtext/core/__init__.py diff --git a/core/admin.py b/richtext/core/admin.py similarity index 100% rename from core/admin.py rename to richtext/core/admin.py diff --git a/core/apps.py b/richtext/core/apps.py similarity index 100% rename from core/apps.py rename to richtext/core/apps.py diff --git a/core/migrations/__init__.py b/richtext/core/migrations/__init__.py similarity index 100% rename from core/migrations/__init__.py rename to richtext/core/migrations/__init__.py diff --git a/core/models.py b/richtext/core/models.py similarity index 100% rename from core/models.py rename to richtext/core/models.py diff --git a/core/tests.py b/richtext/core/tests.py similarity index 100% rename from core/tests.py rename to richtext/core/tests.py diff --git a/core/views.py b/richtext/core/views.py similarity index 100% rename from core/views.py rename to richtext/core/views.py diff --git a/richtext/settings.py b/richtext/settings.py index c44d666..00c03f5 100644 --- a/richtext/settings.py +++ b/richtext/settings.py @@ -20,12 +20,12 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '@=(7^5j&gyk^hnleat8#t&n3_4d&5!(y-_*c4(b5ky-+4#n(q+' +SECRET_KEY = os.environ['SECRET_KEY'] # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ['*'] # Application definition @@ -37,6 +37,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'richtext.core' ] MIDDLEWARE = [ @@ -74,13 +75,9 @@ WSGI_APPLICATION = 'richtext.wsgi.application' # https://docs.djangoproject.com/en/2.0/ref/settings/#databases DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } + 'default': dj_database_url.config(conn_max_age=600) } - # Password validation # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators