I'm new to Django, and I was doing this task with the book Django for beginner, I did everything the book said but keep getting this error when I try to use git push Heroku master.
Here is the log:
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 291 bytes | 145.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/June907/pages-app.git
c9ffa00..b1d98b4 master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
PS C:\Users\Assassin_yoo\Documents\github\bacs350\pages> git push heroku master
Enumerating objects: 33, done.
Counting objects: 100% (33/33), done.
Delta compression using up to 4 threads
Compressing objects: 100% (29/29), done.
Writing objects: 100% (33/33), 5.91 KiB | 432.00 KiB/s, done.
Total 33 (delta 6), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: cp: cannot stat '/tmp/build_f896374c/requirements.txt': No such file or directory
remote: -----> Installing python-3.8.5
remote: -----> Installing pip 9.0.2, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing dependencies with Pipenv 2018.5.18…
remote: Installing dependencies from Pipfile.lock (82e451)…
remote: -----> Installing SQLite3
remote: -----> $ python manage.py collectstatic --noinput
remote: Traceback (most recent call last):
remote: File "manage.py", line 22, in <module>
remote: main()
remote: File "manage.py", line 18, in main
remote: execute_from_command_line(sys.argv)
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
remote: utility.execute()
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
remote: self.fetch_command(subcommand).run_from_argv(self.argv)
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
remote: self.execute(*args, **cmd_options)
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
remote: output = self.handle(*args, **options)
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 194, in handle
remote: collected = self.collect()
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 118, in collect
remote: handler(path, prefixed_path, storage)
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 345, in copy_file
remote: if not self.delete_file(path, prefixed_path, source_storage):
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 255, in delete_file
remote: if self.storage.exists(prefixed_path):
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/files/storage.py", line 311, in exists
remote: return os.path.exists(self.path(name))
remote: File "/app/.heroku/python/lib/python3.8/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 quiet-thicket-93045.
remote:
To https://git.heroku.com/quiet-thicket-93045.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/quiet-thicket-93045.git'
I did every step the book said, but I keep getting the errorcp: cannot stat '/tmp/build_f896374c/requirements.txt': No such file or directory
I'm not sure if I should create a requirments.txt? I am really stuck now, please help.