yes, it is "abcd.*settings*.hk". And I think it will show error if it's 
wrong (?

Ayser shuhaib於 2019年4月18日星期四 UTC+8下午1時10分04秒寫道:
>
> Are you sure about the directory?
> I mean is it “ abcd.setting.hk” or “abcd.settings.hk” ?
>
> On Thu, 18 Apr 2019 at 06:00, ANi <[email protected] <javascript:>> wrote:
>
>>
>> Hi,
>> I divided my settings into different files, but I think it's not working 
>> on Heroku, here are my code:
>>
>> # This is abcd/setting/hk.py
>> from .base import *
>> import dj_database_url
>>
>>
>> DATABASES = {
>>  'default': dj_database_url.config()
>> }
>>
>>
>> ALLOWED_HOSTS.append('abcdmyapp.herokuapps.com')
>> WSGI_APPLICATION = 'abcd.wsgi.hk.application'
>> MIDDLEWARE.append('whitenoise.middleware.WhiteNoiseMiddleware')
>>
>> DEBUG = False
>>
>>
>> I doubt these two configurations because I still can run my app in debug 
>> mode but got a error about not allowing the host and there is no folder 
>> created for static files.
>>
>>
>> More info:
>>
>> # This is base.py
>> # no DATABASES, DEBUG and WSGI_APPLICATION
>>
>> ALLOWED_HOSTS = ['127.0.0.1']
>> MIDDLEWARE = [
>>     'django.contrib.sessions.middleware.SessionMiddleware',
>>     ....
>> ]
>>
>>
>> # This is Procfile
>>
>> web: gunicorn abcd.wsgi.hk 
>> release: python manage.py migrate
>> web: python manage.py runserver 0.0.0.0:$PORT
>>
>> # This is abcd/wsgi/hk.py
>>  
>> import os
>> from django.core.wsgi import get_wsgi_application
>> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "abcd.settings.hk")
>> application = get_wsgi_application()
>>
>>
>>
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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/8a6fe85d-2349-4b58-86df-6e2a4df00500%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/8a6fe85d-2349-4b58-86df-6e2a4df00500%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/919a2737-c2fa-48e7-84ed-5e89a4ac0522%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to