Is there a question here? I will point out what I see wrong in Settings.py.
On Sunday, May 26, 2019 at 4:34:54 PM UTC-5, omar ahmed wrote:
-- Allowed_hosts is empty. Need the host domain.
Missing Port number for your database
Did you migrate your models?
Secret key should be stored in environment variable
On Sunday, May 26, 2019 at 4:34:54 PM UTC-5, omar ahmed wrote:
git push heroku master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 414 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing requirements with pip
remote:
remote: -----> $ python manage.py collectstatic --noinput
remote: 122 static files copied to '/tmp/build_ae5c33e3156cddd5969268ac72b876 68/staticfiles', 392 post-processed.
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 55.3M
remote: -----> Launching...
remote: Released v12
remote: https://arena3.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/arena3.git
48d580d..0dcd3ad master -> mastersettings.py"""Django settings for arena project.Generated by 'django-admin startproject' using Django 2.2.1.For more information on this file, seeFor the full list of settings and their values, see"""import osimport django_herokuimport dj_database_url# Build paths inside the project like this: os.path.join(BASE_DIR, ...)BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath( __file__ )))# Quick-start development settings - unsuitable for production# SECURITY WARNING: keep the secret key used in production secret!SECRET_KEY = '=l&e$6@=a%bu(--=pgd)-i!(&eeag%-i k&%7k11l_7*3j11eln'# SECURITY WARNING: don't run with debug turned on in production!DEBUG = TrueALLOWED_HOSTS = []# Application definitionINSTALLED_APPS = ['core.apps.CoreConfig','django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles','django_social_share',]MIDDLEWARE = ['django.middleware.security.SecurityMiddleware' ,'whitenoise.middleware.WhiteNoiseMiddleware' ,'django.contrib.sessions.middleware.SessionMiddleware' ,'django.middleware.common.CommonMiddleware' ,'django.middleware.csrf.CsrfViewMiddleware' ,'django.contrib.auth.middleware. ,AuthenticationMiddleware' 'django.contrib.messages.middleware.MessageMiddleware' ,'django.middleware.clickjacking. ,XFrameOptionsMiddleware' ]ROOT_URLCONF = 'arena.urls'TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates' ,'DIRS': [os.path.join(BASE_DIR,'templates' )],'APP_DIRS': True,'OPTIONS': {'context_processors': ['django.template.context_processors.debug' ,'django.template.context_processors.request' ,'django.contrib.auth.context_processors.auth' ,'django.contrib.messages.context_processors.messages' ,'core.context_processors.add_to_base' ,],},},]WSGI_APPLICATION = 'arena.wsgi.application'# DatabaseDATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2' ,'NAME': 'arenadb','USER': 'arenaomar','PASSWORD': '','HOST': 'localhost','PORT': '',}}# Password validationAUTH_PASSWORD_VALIDATORS = [{'NAME': 'django.contrib.auth.password_validation. ,UserAttributeSimilarityValidat or' },{'NAME': 'django.contrib.auth.password_validation. ,MinimumLengthValidator' },{'NAME': 'django.contrib.auth.password_validation. ,CommonPasswordValidator' },{'NAME': 'django.contrib.auth.password_validation. ,NumericPasswordValidator' },]# InternationalizationLANGUAGE_CODE = 'en-us'TIME_ZONE = 'UTC'USE_I18N = TrueUSE_L10N = TrueUSE_TZ = True# Static files (CSS, JavaScript, Images)PROJECT_ROOT = os.path.dirname(os.path.abspath( __file__))STATIC_URL = '/static/'STATIC_ROOT = os.path.join(BASE_DIR, 'static')STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesS torage' STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),)MEDIA_URL = '/media/'MEDIA_ROOT = os.path.join(BASE_DIR, 'media')LOGIN_REDIRECT_URL = 'core:home'LOGOUT_REDIRECT_URL = 'core:home'db_from_env = dj_database_url.config(conn_max_age =500)DATABASES['default'].update(db_from_env) django_heroku.settings(locals())
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5b52d003-57b3-4505-8daf-89daa184e45b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment