You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i deployed my website on heroku but when i am trying to run this command **heroku run python manage.py collectstatic ** its show the error OSError: [Errno 30] Read-only file system: '/static_in_env' and the majaor problem is that it try to collect static files according to directory of local.py settings not production.py setting. and
when i run the command heroku run python manage.py migrate its showing this heroku run python manage.py migrate Running python manage.py migrate on ⬢ flyingstore... up, run.3581 (Free) Operations to perform: Synchronize unmigrated apps: django_filters, crispy_forms, staticfiles, messages Apply all migrations: orders, admin, sites, products, auth, sessions, carts, contenttypes, registration, newsletter Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: No migrations to apply.
HERE is my production.py file is
`
from django.conf import settings
if not settings.DEBUG:
import os
The STATIC_ROOT and MEDIA_ROOT configuration is like this src(root of my application) inside src manage.py file is there src--->manage.py live-static-files (folder as same label of manage.py file)--->media-root(folder inside live-static-files) static-root(same label on media-root)
when i am running heroku run python manage.py collectstatic then it try to collect static file here
/static_in_env which is in my ## local.py file
why its happening even my local.py file is inside the .gitignore file
it should collect the staticfiles here '/live-static-files' ' according to my production.py settings
but its try to do according local.py settings
please tell me what should i do so it work fine
The text was updated successfully, but these errors were encountered:
rahul6612
changed the title
production setting not migrating nor collectstatic files
production.py setting not migrating nor collectstatic files properly & OSError: [Errno 30] Read-only file system
Apr 14, 2018
i deployed my website on heroku but when i am trying to run this command **heroku run python manage.py collectstatic ** its show the error
OSError: [Errno 30] Read-only file system: '/static_in_env'
and the majaor problem is that it try to collect static files according to directory of local.py settings not production.py setting. andwhen i run the command heroku run python manage.py migrate its showing this
heroku run python manage.py migrate Running python manage.py migrate on ⬢ flyingstore... up, run.3581 (Free) Operations to perform: Synchronize unmigrated apps: django_filters, crispy_forms, staticfiles, messages Apply all migrations: orders, admin, sites, products, auth, sessions, carts, contenttypes, registration, newsletter Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: No migrations to apply.
HERE is my production.py file is
`
from django.conf import settings
if not settings.DEBUG:
import os
BRAINTREE_PUBLIC = "2f8dqqhqs7wz95t8"
BRAINTREE_PRIVATE = "9d2f9ddfaefd81d6af09d537017d86c4"
BRAINTREE_MERCHANT_ID = "68nvwyj4qsz7rnzc"
BRAINTREE_ENVIRONEMNT = "Sandbox" `
The STATIC_ROOT and MEDIA_ROOT configuration is like this
src(root of my application) inside src manage.py file is there src--->manage.py live-static-files (folder as same label of manage.py file)--->media-root(folder inside live-static-files) static-root(same label on media-root)
when i am running heroku run python manage.py collectstatic then it try to collect static file here
/static_in_env
which is in my ## local.py filewhy its happening even my local.py file is inside the .gitignore file
it should collect the staticfiles here '/live-static-files' ' according to my production.py settings
but its try to do according local.py settings
please tell me what should i do so it work fine
The text was updated successfully, but these errors were encountered: