{"action":"opened","issue":{"url":"https://api.github.com/repos/rahul6612/flying-store/issues/1","repository_url":"https://api.github.com/repos/rahul6612/flying-store","labels_url":"https://api.github.com/repos/rahul6612/flying-store/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/rahul6612/flying-store/issues/1/comments","events_url":"https://api.github.com/repos/rahul6612/flying-store/issues/1/events","html_url":"https://github.com/rahul6612/flying-store/issues/1","id":314281837,"number":1,"title":"production setting not migrating nor collectstatic files","user":{"login":"rahul6612","id":13725688,"avatar_url":"https://avatars3.githubusercontent.com/u/13725688?v=4","gravatar_id":"","url":"https://api.github.com/users/rahul6612","html_url":"https://github.com/rahul6612","followers_url":"https://api.github.com/users/rahul6612/followers","following_url":"https://api.github.com/users/rahul6612/following{/other_user}","gists_url":"https://api.github.com/users/rahul6612/gists{/gist_id}","starred_url":"https://api.github.com/users/rahul6612/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahul6612/subscriptions","organizations_url":"https://api.github.com/users/rahul6612/orgs","repos_url":"https://api.github.com/users/rahul6612/repos","events_url":"https://api.github.com/users/rahul6612/events{/privacy}","received_events_url":"https://api.github.com/users/rahul6612/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-14T00:09:56Z","updated_at":"2018-04-14T00:09:56Z","closed_at":null,"author_association":"OWNER","body":"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 \r\nwhen i run the command **heroku run python manage.py migrate** its showing this\r\n`heroku run python manage.py migrate\r\nRunning python manage.py migrate on ⬢ flyingstore... up, run.3581 (Free)\r\nOperations to perform:\r\n  Synchronize unmigrated apps: django_filters, crispy_forms, staticfiles, messages\r\n  Apply all migrations: orders, admin, sites, products, auth, sessions, carts, contenttypes, registration, newsletter\r\nSynchronizing apps without migrations:\r\n  Creating tables...\r\n    Running deferred SQL...\r\n  Installing custom SQL...\r\nRunning migrations:\r\n  No migrations to apply.`\r\n\r\n**HERE is my production.py file is**\r\n` \r\nfrom django.conf import settings\r\nif not settings.DEBUG:\r\n\timport os\r\n\r\n\tBASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))\r\n\t\r\n\tSECRET_KEY = 'csqwlmc8s55o($rt6ozh7u+ui9zb-et00w$d90j8$^!nvj41_r'\r\n\r\n\t# SECURITY WARNING: don't run with debug turned on in production!\r\n\tDEBUG = False\r\n\r\n\tADMINS = (\r\n\t\t(\"rahul\", \"rahulverma6612@gmail.com\"),\r\n\r\n\t\t)\r\n\r\n\tALLOWED_HOSTS = [\"flyingstore.herokuapp.com\"]\r\n\t\r\n\r\n\tEMAIL_HOST = 'smtp.gmail.com'\r\n\tEMAIL_HOST_USER = 'yourgmail@gmail.com'\r\n\tEMAIL_HOST_PASSWORD = 'yourpassword'\r\n\tEMAIL_PORT = 587\r\n\tEMAIL_USE_TLS = True\r\n\r\n\r\n\t# Application definition\r\n\r\n\tINSTALLED_APPS = (\r\n\t\t# django app\r\n\t\t'django.contrib.admin',\r\n\t\t'django.contrib.auth',\r\n\t\t'django.contrib.contenttypes',\r\n\t\t'django.contrib.sessions',\r\n\t\t'django.contrib.sites',\r\n\t\t'django.contrib.messages',\r\n\t\t'django.contrib.staticfiles',\r\n\t\r\n\t\t'crispy_forms',\r\n\t\t'django_filters',\r\n\t\t'registration',\r\n\t\r\n\t\t'carts',\r\n\t\t'newsletter',\r\n\t\t'orders',\r\n\t\t'products',\r\n\t\t'storages',\r\n\t\t'boto',\r\n\t)\r\n\tMIDDLEWARE_CLASSES = (\r\n\t    'django.contrib.sessions.middleware.SessionMiddleware',\r\n\t\t'whitenoise.middleware.WhiteNoiseMiddleware',\r\n\t    'django.middleware.common.CommonMiddleware',\r\n\t    'django.middleware.csrf.CsrfViewMiddleware',\r\n\t    'django.contrib.auth.middleware.AuthenticationMiddleware',\r\n\t    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\r\n\t    'django.contrib.messages.middleware.MessageMiddleware',\r\n\t    'django.middleware.clickjacking.XFrameOptionsMiddleware',\r\n\t    'django.middleware.security.SecurityMiddleware',\r\n\t)\r\n\r\n\tROOT_URLCONF = 'ecommerce2.urls'\r\n\r\n\tTEMPLATES = [\r\n\t    {\r\n\t        'BACKEND': 'django.template.backends.django.DjangoTemplates',\r\n\t        'DIRS': [os.path.join(BASE_DIR, \"templates\")],\r\n\t        'APP_DIRS': True,\r\n\t        'OPTIONS': {\r\n\t            'context_processors': [\r\n\t                'django.template.context_processors.debug',\r\n\t                'django.template.context_processors.request',\r\n\t                'django.contrib.auth.context_processors.auth',\r\n\t                'django.contrib.messages.context_processors.messages',\r\n\t            ],\r\n\t        },\r\n\t    },\r\n\t]\r\n\r\n\tWSGI_APPLICATION = 'ecommerce2.wsgi.application'\r\n\r\n\r\n\t# Database\r\n\t\r\n\r\n\t# from .db_password import DBPASS\r\n\r\n\tDATABASES = {\r\n\t    'default': {\r\n\t        'ENGINE': 'django.db.backends.postgresql_psycopg2',\r\n\t        'NAME': 'flying_store',\r\n\t        'USER': \"postgres\",\r\n\t        'PASSWORD': 'Rahul6612x',\r\n\t\t\t'HOST': '',\r\n\t\t\t'PORT': ''\r\n\t    }\r\n\t}\r\n\timport dj_database_url\r\n\r\n\tdb_from_env = dj_database_url.config()\r\n\tDATABASES['default'].update(db_from_env)\r\n\r\n\r\n\t# Internationalization\r\n\t\r\n\r\n\tLANGUAGE_CODE = 'en-us'\r\n\r\n\tTIME_ZONE = 'UTC'\r\n\r\n\tUSE_I18N = True\r\n\r\n\tUSE_L10N = True\r\n\r\n\tUSE_TZ = True\r\n\r\n\r\n\r\n\r\n\r\n\t# STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'\r\n\r\n\r\n\r\n\tSTATIC_URL = '/static/'\r\n\tMEDIA_URL = '/media/'\r\n\r\n\tSTATICFILES_DIRS = (\r\n\t\tos.path.join(BASE_DIR, \"static-storage\"),\r\n\t)\r\n\tSTATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'\r\n\r\n\r\n\tSTATIC_ROOT = os.path.join(BASE_DIR, 'live-static-files', 'static-root')\r\n\tMEDIA_ROOT = os.path.join(BASE_DIR, 'live-static-files', 'media-root')\r\n\r\n\r\n\r\n\r\n\r\n\tSTATICFILES_FINDERS = (\r\n\t\t'django.contrib.staticfiles.finders.FileSystemFinder',\r\n\t\t'django.contrib.staticfiles.finders.AppDirectoriesFinder',\r\n\r\n\t)\r\n\r\n\t#Crispy FORM TAGs SETTINGS\r\n\tCRISPY_TEMPLATE_PACK = 'bootstrap3'\r\n\r\n\r\n\t#DJANGO REGISTRATION REDUX SETTINGS\r\n\tACCOUNT_ACTIVATION_DAYS = 7\r\n\tREGISTRATION_AUTO_LOGIN = True\r\n\tSITE_ID = 1\r\n\tLOGIN_REDIRECT_URL = '/'\r\n\r\nBRAINTREE_PUBLIC = \"2f8dqqhqs7wz95t8\"\r\nBRAINTREE_PRIVATE = \"9d2f9ddfaefd81d6af09d537017d86c4\"\r\nBRAINTREE_MERCHANT_ID = \"68nvwyj4qsz7rnzc\"\r\nBRAINTREE_ENVIRONEMNT = \"Sandbox\" `\r\n\r\n**The STATIC_ROOT and MEDIA_ROOT  configuration is like this**\r\n` src(root of my application) inside src manage.py file is there\r\nsrc--->manage.py\r\n           live-static-files (folder as same label of manage.py file)--->media-root(folder inside live-static-files)\r\n                                                                                                          static-root(same label on media-root)\r\n`\r\n## when i am running **heroku run python manage.py collectstatic**  then it try to collect static file here\r\n` /static_in_env` which is in my ## local.py file \r\nwhy its happening even my local.py file is inside the **.gitignore** file\r\nit should collect the staticfiles here '/live-static-files' ' according to my production.py settings\r\n but its try to do according local.py settings\r\n\r\nplease tell me what should i do so it work fine\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"rahul6612"}}