michaelb@pat:~/tmp/3_django_apis$ ls
instructions.md  manage.py  Procfile  static  templates  urls.py  views.py
michaelb@pat:~/tmp/3_django_apis$ pipenv --python 3
Creating a virtualenv for this project…
Using /usr/bin/python3 (3.6.9) to create virtualenv…Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/michaelb/.virtualenvs/3_django_apis-DNI4X3gy/bin/python3
Also creating executable in /home/michaelb/.virtualenvs/3_django_apis-DNI4X3gy/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /home/michaelb/.virtualenvs/3_django_apis-DNI4X3gy
Creating a Pipfile for this project…
michaelb@pat:~/tmp/3_django_apis$ pipenv shell
Spawning environment shell (/bin/bash). Use 'exit' to leave.
. /home/michaelb/.virtualenvs/3_django_apis-DNI4X3gy/bin/activate
michaelb@pat:~/tmp/3_django_apis$ . /home/michaelb/.virtualenvs/3_django_apis-DNI4X3gy/bin/activate
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ pipenv install django
Installing djangoCollecting django
  Using cached Django-3.2.3-py3-none-any.whl (7.9 MB)
Collecting asgiref<4,>=3.3.2
  Using cached asgiref-3.3.4-py3-none-any.whl (22 kB)
Collecting sqlparse>=0.2.2
  Using cached sqlparse-0.4.1-py3-none-any.whl (42 kB)
Collecting pytz
  Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting typing-extensions
  Using cached typing_extensions-3.10.0.0-py3-none-any.whl (26 kB)
Installing collected packages: typing-extensions, sqlparse, pytz, asgiref, django
Successfully installed asgiref-3.3.4 django-3.2.3 pytz-2021.1 sqlparse-0.4.1 typing-extensions-3.10.0.0

Adding django to Pipfile's [packages]
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (85c883)!
Installing dependencies from Pipfile.lock (85c883)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 5/5 — 00:00:01
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ pipenv install requests
Installing requestsCollecting requests
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet<5,>=3.0.2
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Installing collected packages: urllib3, idna, chardet, certifi, requests
Successfully installed certifi-2020.12.5 chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.4

Adding requests to Pipfile's [packages]
Pipfile.lock (85c883) out of date, updating to (47b8e1)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (47b8e1)!
Installing dependencies from Pipfile.lock (47b8e1)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 10/10 — 00:00:02
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ git status
fatal: not a git repository (or any of the parent directories): .git
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ ls
instructions.md  Pipfile       Procfile  templates  views.py
manage.py        Pipfile.lock  static    urls.py
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ git init
Initialized empty Git repository in /home/michaelb/tmp/3_django_apis/.git/
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ git add -A
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ git commit -am 'ready to launch!'
[master (root-commit) cfdf515] ready to launch!
 12 files changed, 621 insertions(+)
 create mode 100644 Pipfile
 create mode 100644 Pipfile.lock
 create mode 100644 Procfile
 create mode 100644 instructions.md
 create mode 100644 manage.py
 create mode 100644 static/giggle_logo.png
 create mode 100644 static/giggle_news.png
 create mode 100644 templates/homepage.html
 create mode 100644 templates/news.html
 create mode 100644 templates/search_results.html
 create mode 100644 urls.py
 create mode 100644 views.py
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ git log
commit cfdf515d2b248b46acffa3df7d1de1b96631fdfc (HEAD -> master)
Author: Michael Bethencourt <michaelpb@gmail.com>
Date:   Tue May 18 16:44:16 2021 -0700

    ready to launch!
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ heroku create
Creating app... done, ⬢ desolate-sea-19480
https://desolate-sea-19480.herokuapp.com/ | https://git.heroku.com/desolate-sea-19480.git
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ git remote -v
heroku	https://git.heroku.com/desolate-sea-19480.git (fetch)
heroku	https://git.heroku.com/desolate-sea-19480.git (push)
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ git push
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using

    git remote add <name> <url>

and then push using the remote name

    git push <name>
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ git push heroku master
Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (16/16), 39.51 KiB | 4.94 MiB/s, done.
Total 16 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Python app detected
remote: -----> Using Python version specified in Pipfile.lock
remote: cp: cannot stat '/tmp/build_79c2e631/requirements.txt': No such file or directory
remote: -----> Installing python-3.6.13
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote:        Installing dependencies from Pipfile.lock (47b8e1)...
remote: -----> Installing SQLite3
remote: -----> $ python manage.py collectstatic --noinput
remote:        Traceback (most recent call last):
remote:          File "manage.py", line 24, in <module>
remote:            execute_from_command_line(sys.argv)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
remote:            utility.execute()
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 413, in execute
remote:            self.fetch_command(subcommand).run_from_argv(self.argv)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py", line 354, in run_from_argv
remote:            self.execute(*args, **cmd_options)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py", line 398, in execute
remote:            output = self.handle(*args, **options)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 187, in handle
remote:            collected = self.collect()
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 114, in collect
remote:            handler(path, prefixed_path, storage)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 338, in copy_file
remote:            if not self.delete_file(path, prefixed_path, source_storage):
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 248, in delete_file
remote:            if self.storage.exists(prefixed_path):
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/files/storage.py", line 318, in exists
remote:            return os.path.exists(self.path(name))
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/storage.py", line 38, in path
remote:            raise ImproperlyConfigured("You're using the staticfiles app "
remote:        django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
remote: 
remote:  !     Error while running '$ python manage.py collectstatic --noinput'.
remote:        See traceback above for details.
remote: 
remote:        You may need to update application code to resolve this error.
remote:        Or, you can disable collectstatic for this application:
remote: 
remote:           $ heroku config:set DISABLE_COLLECTSTATIC=1
remote: 
remote:        https://devcenter.heroku.com/articles/django-assets
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !	Push rejected to desolate-sea-19480.
remote: 
To https://git.heroku.com/desolate-sea-19480.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/desolate-sea-19480.git'
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ heroku config:set DISABLE_COLLECTSTATIC=1
    Warning: heroku update available from 7.52.0 to 7.54.0.
Setting DISABLE_COLLECTSTATIC and restarting ⬢ desolate-sea-19480... done, v3
DISABLE_COLLECTSTATIC: 1
(3_django_apis-DNI4X3gy) michaelb@pat:~/tmp/3_django_apis$ git push heroku master
Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (16/16), 39.51 KiB | 9.88 MiB/s, done.
Total 16 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Python app detected
remote: -----> Using Python version specified in Pipfile.lock
remote: cp: cannot stat '/tmp/build_8d3712a6/requirements.txt': No such file or directory
remote: -----> Installing python-3.6.13
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote:        Installing dependencies from Pipfile.lock (47b8e1)...
remote: -----> Installing SQLite3
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote: 
remote: -----> Compressing...
remote:        Done: 69.2M
remote: -----> Launching...
remote:        Released v6
remote:        https://desolate-sea-19480.herokuapp.com/ deployed to Heroku
remote: 
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: cfdf515d2b248b46acffa3df7d1de1b96631fdfc
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version cfdf515d2b248b46acffa3df7d1de1b96631fdfc
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku <branchname>:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote: 
remote: Verifying deploy... done.
To https://git.heroku.com/desolate-sea-19480.git
 * [new branch]      master -> master
Edit in JS Bin