Django Debug False 500 error Solved
Being involved in Full Stack Django/Python Web Application Development for 3 years now, I recently deployed my Django application on a test server and encountered Server Error (500) on Django when template debug is set to False. That is in Django settings.py, when I changed DEBUG = FALSE from DEBUG = TRUE, it caused 500 error.
I had upgraded my application from Django 1.4 to Django 1.7. I came to know that 500 error on DEBUG = False error is encountered by everyone using django 1.5 or greater as soon as they change their settings.py to DEBUG = False. Well my problem got solved after reading several blogs and digging deeper in the Django Docs for DEBUG = False ALLOWED_HOSTS settings.
What I did was, in settings.py, changed ALLOWED_HOSTS value in the following way:
If you have a domain name of your server, you may write:
Being involved in Full Stack Django/Python Web Application Development for 3 years now, I recently deployed my Django application on a test server and encountered Server Error (500) on Django when template debug is set to False. That is in Django settings.py, when I changed DEBUG = FALSE from DEBUG = TRUE, it caused 500 error.
I had upgraded my application from Django 1.4 to Django 1.7. I came to know that 500 error on DEBUG = False error is encountered by everyone using django 1.5 or greater as soon as they change their settings.py to DEBUG = False. Well my problem got solved after reading several blogs and digging deeper in the Django Docs for DEBUG = False ALLOWED_HOSTS settings.
What I did was, in settings.py, changed ALLOWED_HOSTS value in the following way:
ALLOWED_HOSTS = ['123.123.198.123'] # Above mentioned IP is not my actual IP. Enter your actual server IP or domain name here.
If you have a domain name of your server, you may write:
ALLOWED_HOSTS = ['www.example.com']You can also use a '*' wildcard to allow all hosts. But this is not recommended in the production environment.
ALLOWED_HOSTS = ['*']You can find a full detail regarding the ALLOWED_HOSTS settings here hidden deep inside django document
Your my hero. On my blog technelogos.com/blog, I've been trying to solve this error at least for the past few months. Nothing worked until I came across this blog post. I can't thank you enough!
ReplyDeleteGood job man!
ReplyDeletethanks!!!
ReplyDeleteSaved
Thank you...
ReplyDeleteThanks for sharing. Django is the powerful framework of Python. Kanhasoft is the leading Django web development company in India and USA. With the team of 45 experienced Web developers, we are outsourcing mobile and web application services to Canada, USA, Denmark, Australia, South Africa and more.
ReplyDeleteGreat work man.Thank you
ReplyDelete(https://counfreedise.in/)
Very Helpful and informative blog! Keep sharing such blogsSoftware Development Company in India
ReplyDeleteGreat Article
ReplyDeleteFinal Year Projects for CSE in Python
FInal Year Project Centers in Chennai
Python Training in Chennai
Python Training in Chennai
Nice! thank you so much! Thank you for sharing. Your blog posts are more interesting and informative. I think there are many people like and visit it regularly, including me. Custom Software Development Services
ReplyDeleteGreat ideas and relevant information about the software developer which are work for their convenience, thank you for the blog here alofatechlabs
ReplyDeletenice information thanks for sharing........................!
ReplyDeleteActive Directory online training
Active Directory training
Appian BPM online training
Appian BPM training
arcsight online training
arcsight training
Build and Release online training
Build and Release training
Dell Bhoomi online training
Dell Bhoomi training
Dot Net online training
Dot Net training
ETL Testing online training
ETL Testing training
Hadoop online training
Hadoop training
Tibco online training
Tibco training
Tibco spotfire online training
Tibco spotfire training
ReplyDeleteI am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.I want to share about tibco training .
Revolution of Data Science has changed the world with its substantial impact. It is a study of data or information, what it represents, from where it is obtained and how to transform it into a valuable method when formulating business and IT policy. data science course syllabus
ReplyDeleteThis is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the good work. I have been meaning to write something like this on my website and you have given me an idea.
ReplyDeletedata science course in India
I just loved your article on the beginners guide to starting a blog.If somebody take this blog article seriously
ReplyDeletein their life, he/she can earn his living by doing blogging.Thank you for this article.
tibco sportfire online training
I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
ReplyDeleteArtificial Intelligence Course
Aivivu chuyên vé máy bay, tham khảo
ReplyDeletegiá vé máy bay tết
vé máy bay đi Mỹ tháng nào rẻ nhất
vé máy bay đi Pháp giá rẻ
vé máy bay đà nẵng đi hàn quốc
vé máy bay qua nhật
bay từ việt nam sang Anh mất bao lâu
săn vé máy bay 0 đồng
Đặt vé máy bay tại Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ giá bao nhiêu
các chuyến bay từ mỹ về việt nam hiện nay
giá vé máy bay từ đức về việt nam
vé máy bay từ nga về tphcm
ReplyDeleteThat is nice article from you, this is informative stuff. Hope more articles from you . I also want to share some information about bw Training
aşk kitapları
ReplyDeleteyoutube abone satın al
cami avizesi
cami avizeleri
avize cami
no deposit bonus forex 2021
takipçi satın al
takipçi satın al
takipçi satın al
takipcialdim.com/tiktok-takipci-satin-al/
instagram beğeni satın al
instagram beğeni satın al
btcturk
tiktok izlenme satın al
sms onay
youtube izlenme satın al
no deposit bonus forex 2021
tiktok jeton hilesi
tiktok beğeni satın al
binance
takipçi satın al
uc satın al
sms onay
sms onay
tiktok takipçi satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
instagram beğeni satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
takipcialdim.com/instagram-begeni-satin-al/
perde modelleri
instagram takipçi satın al
instagram takipçi satın al
takipçi satın al
instagram takipçi satın al
betboo
marsbahis
sultanbet
www.escortsmate.com
ReplyDeleteescortsmate.com
https://www.escortsmate.com
marsbahis
ReplyDeletebetboo
sultanbet
marsbahis
betboo
sultanbet
This is very informative blog.i have learn lots from your blog, keep updating.
ReplyDeleteMulesoft Training In Hyderabad
I really enjoyed reading your blog. Great blog.
ReplyDeleteservicenow training and placement in hyderabad
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.
ReplyDeleteMulesoft training in hyderabad
Very nice blog, with a lot of new information. Thanks for sharing the wonderful blog. Keep going on.
ReplyDeleteUbs accounting
Myob Singapore
Skill future accounting software
Best Accounting software Singapore
Well explained, this post has the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
ReplyDeleteServiceNow Training in Chennai
It is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn't wait reading. I am impressed with your work and skill. Thanks.
ReplyDeleteMulesoft training in hyderabad
This post is very simple to read and appreciate without leaving any details out. Great work !
ReplyDeleteServiceNow Training in Chennai
tiktok jeton hilesi
ReplyDeletetiktok jeton hilesi
referans kimliği nedir
gate güvenilir mi
tiktok jeton hilesi
paribu
btcturk
bitcoin nasıl alınır
yurtdışı kargo
As I am looking at your writing, 파워볼사이트 I regret being unable to do outdoor activities due to Corona 19, and I miss my old daily life. If you also miss the daily life of those days, would you please visit my site once? My site is a site where I post about photos and daily life when I was free.
ReplyDeleteI am inspired with your post writing style & how continuously you describe this topic. micro nutrient for plant
ReplyDeleteAhaa, its nice dialogue about this piece of writing at this place at this webpage,
ReplyDeleteI have read all that, so at this time me also commenting here.
havanese dogs for sale
havanese puppies for sale
teacup havanese puppy
chocolate havanese puppy for sale
teacup pomeranian for sale
doodle puppies
aussiedoodle puppies for sale
bernedoodle puppies for sale
goldendoodle puppies for sale
https://www.fluffyhavanese.com/
Thanks for sharing your thoughts. I truly appreciate your efforts and I will be waiting for your further
ReplyDeletewrite ups thanks once again
pomeranian puppies for sales
pomeranian for sale
teacup pomeranian for sale near me
pomeranians for sale near me
teacup pomeranian for sale
pomeranian puppies for sales
pomeranian for sale
teacup pomeranian for sale
havanese puppies for sale near me
https://www.pomeranianpuppiesforsales.com/
I used to be suggested this website by means of my cousin. I’m now not sure whether
ReplyDeletethis submit is written by him as nobody else know such detailed approximately my problem.
ragdoll kitten for sale
ragdoll kittens for sale
mini goldendoodle for sale
mini bernedoodle puppies for sale
mini aussiedoodles for sale
havanese puppy for sale
teacup havanese puppies for sale
havanese puppies for sale near me
havanese puppies for sale under $1,000
havanese puppy for sale
https://thegorgeousragdolls.com/
I take pleasure in, result in I discovered exactly what I used to be taking a look
ReplyDeletefor. You’ve ended my 4 day lengthy hunt! God Bless you man.
great dane puppies for sale
great dane puppy for sale
great dane puppies near me
great dane puppies for sale near me
ragdoll kittens for sale near me
ragdoll kitten near me
goldendoodle for sale
teacup havanese puppies for sale
pomeranian teacup for sale
great dane puppy for sale
https://www.redemptionbullies.com/
At this time I am going away to do my breakfast, afterward having my breakfast coming over again to read further news
ReplyDeleteragdoll cat for sale
ragdoll cats for sale
aussiedoodle for sale
bernedoodles for sale
havanese puppies for sale under $1,000
great dane puppies for sale
great dane puppy for sale
great dane puppies near me
great dane puppies for sale near me
https://thegorgeousdoodles.com/
İnstagram takipçi satın al! İnstagram takipçi sitesi ile takipçi satın al sende sosyal medyada fenomen olmaya bir adım at. Sende hemen instagram takipçi satın almak istiyorsan tıkla:
ReplyDelete1- takipçi satın al
2- takipçi satın al
3- takipçi satın al
Mule masters Hyderabad,provides 100% job assistance, extending real time projects for practical knowledge this is best course you have interest visit my website link https://mulemasters.in/
ReplyDeleteRetaining a fresh home is usually difficult, especially on the subject of the kitchen's. Refrigerators are likely to need far more care than most of them receive in addition to that’s the reason DIALAMAID is desirous to provide family fridge cleaning for addition to our housecleaning products and services. From leaking beverages to help remnants connected with food, products stored with your fridge can seem unattainable to retail store without anything getting found lacking. When people add that service on your cleaning approach, you can feel comfortable we’ll leave the medial side and away from your freezer looking including new. cleaning companies in dubai
ReplyDeleteRoyalcasino326
ReplyDeleteđại lý vé Eva Air
ReplyDeletecách đổi trả vé máy bay China Airlines
muốn mua thêm hành lý ký gửi Japan Airlines