Follow a tutorial.
1) Hide your secret key and everything secretive in an environment
variable. Or use Django-environ
2) Try python manage.py check —deploy
3) Debug is set to True... it should not be True if you’re publishing
(deploying)

On Mon, May 27, 2019 at 3:46 PM omar ahmed <[email protected]> wrote:

> i can't publish my project
>
>
> On Monday, May 27, 2019 at 8:45:59 PM UTC+2, Jamiu Olashile Salimon wrote:
>>
>> Hello Omar, what’s the problem?
>>
>> On Sun, 26 May 2019 at 10:35 PM, omar ahmed <[email protected]> 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_ae5c33e3156cddd5969268ac72b87668/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 -> master
>>>
>>> settings.py
>>>
>>> """
>>> Django settings for arena project.
>>>
>>> Generated by 'django-admin startproject' using Django 2.2.1.
>>>
>>> For more information on this file, see
>>> https://docs.djangoproject.com/en/2.2/topics/settings/
>>>
>>> For the full list of settings and their values, see
>>> https://docs.djangoproject.com/en/2.2/ref/settings/
>>> """
>>>
>>> import os
>>> import django_heroku
>>> import 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
>>> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>>>
>>> # SECURITY WARNING: keep the secret key used in production secret!
>>> SECRET_KEY = '=l&e$6@=a%bu(--=pgd)-i!(&eeag%-ik&%7k11l_7*3j11eln'
>>>
>>> # SECURITY WARNING: don't run with debug turned on in production!
>>> DEBUG = True
>>>
>>> ALLOWED_HOSTS = []
>>>
>>>
>>> # Application definition
>>>
>>> INSTALLED_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'
>>>
>>>
>>> # Database
>>> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
>>> 'NAME': 'arenadb',
>>>      'USER': 'arenaomar',
>>>      'PASSWORD': '',
>>>      'HOST': 'localhost',
>>>      'PORT': '',
>>> }
>>> }
>>>
>>>
>>> # Password validation
>>> #
>>> https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>>>
>>> AUTH_PASSWORD_VALIDATORS = [
>>> {
>>> 'NAME':
>>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'
>>> ,
>>> },
>>> {
>>> 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'
>>> ,
>>> },
>>> {
>>> 'NAME':
>>> 'django.contrib.auth.password_validation.CommonPasswordValidator',
>>> },
>>> {
>>> 'NAME':
>>> 'django.contrib.auth.password_validation.NumericPasswordValidator',
>>> },
>>> ]
>>>
>>>
>>> # Internationalization
>>> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>>>
>>> LANGUAGE_CODE = 'en-us'
>>>
>>> TIME_ZONE = 'UTC'
>>>
>>> USE_I18N = True
>>>
>>> USE_L10N = True
>>>
>>> USE_TZ = True
>>>
>>>
>>> # Static files (CSS, JavaScript, Images)
>>> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>>>
>>>
>>> PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
>>> STATIC_URL = '/static/'
>>> STATIC_ROOT = os.path.join(BASE_DIR, 'static')
>>> STATICFILES_STORAGE =
>>> 'whitenoise.storage.CompressedManifestStaticFilesStorage'
>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> 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/5edbcc2c-ce02-4949-906e-e75b4f519016%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/5edbcc2c-ce02-4949-906e-e75b4f519016%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/9f76732f-5e99-4e90-88c5-63eeefe3bfee%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/9f76732f-5e99-4e90-88c5-63eeefe3bfee%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAJVmkNmTK2scPfJbEonsftB77uJWcMGgXQJ11ud%2BCv0XJw14Qw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to