_ROOT = os.path.join(BASE_DIR,'staticfiles')

DATABASES = {}
DATABASES['default'] =  dj_database_url.config()

A:

The root cause of issue - False translated to 'False' string not bool.
Used next solution (settings.py):
DEBUG = os.getenv('DEBUG', False) == 'True'

i.e.: in this case DEBUG will set to (bool) True, only if the environment variable is explicitly set to True or 'True'.
Good luck configuring! :)

A:

As a note for others: I had the same problem; I configured my production website on a VM with gunicorn and nginx, following the tutorial for ubuntu 16.04 from the digital ocean documentation.
I wasn't able to turn off the debug mode, even when restarting the nginx systemd's service: the solution was to restart also the gunicorn service:
# systemctl restart nginx gunicorn

A:

This ended up being an issue with the config variable being "False" instead of False, and so debug wasn't properly set to the boolean value. Shoutout to @WithNail for helping get to the answer

 Q:

setting the NR to 1 does not work (awk)

I have the following script in bash. 
awk -F ":" '{if($1 ~ "^fall") 
                      { NR==1
                      {{printf "\t<course id=\"%s\">\n",$1} } } }' file1.txt > container.xml

So what I have a small file. If ANY line starts with fall, then I want the first field of the VERY first line.
So I did that in the code and set NR==1. However, it does not do the job!!!

A:

Try this:
awk -F: 'NR==1 {id=$1} $1~/^fall/ {printf "\t<course id=\"%s\">\n",id}' file1.txt > container.xml

Notes:

NR==1 {id=$1}
This saves the course ID from the first line
$1~/^fall/ {printf "\t<course id=\"%s\">\n",id}
If any line begins with fall, then
_ ROOT = os.path.join(BASE_DIR,'staticfiles') 

 DATABASES = { } 
 DATABASES['default' ] =   dj_database_url.config () 

 A: 

 The root cause of issue - assumed translate to' False' chain not bool. 
 use next solution (settings.py ): 
 DEBUG = os.getenv('DEBUG', False) = =' on-key' 

 i.e.: in this character DEBUG will set to (bool) truthful, only if the environment variable is explicitly set up to True or' True'. 
 dependable fortune configuring! :) 

 A: 

 As a bill for others: I had the same trouble; I configured my production website on a VM with gunicorn and nginx, postdate the tutorial for ubuntu 16.04 from the digital ocean documentation. 
 I wasn't able to turn off the debug manner, even when restarting the nginx systemd's military service: the solution was to restart also the gunicorn service: 
 # systemctl restart nginx gunicorn 

 A: 

 This ended up being an return with the config variable being " False " instead of False, and so debug wasn't properly jell to the boolean value. Shoutout to @WithNail for helping get to the answer 

  Q: 

 setting the NR to 1 does not work (awk) 

 I have the following script in bash. 
 awk -F ": "' { if($1 ~ " ^fall ") 
                       { NR==1 
                       { { printf " \t < course id=\"%s\">\n",$1 } } } }' file1.txt > container.xml 

 thus what I have a small file. If ANY occupation depart with fall, then I want the first discipline of the identical first line. 
 So I suffice that in the code and set NR==1. However, it does not do the job! !! 

 A: 

 Try this: 
 awk -F:' NR==1 { id=$1 } $ 1~/^fall/ { printf " \t < course id=\"%s\">\n",id }' file1.txt > container.xml 

 Notes: 

 NR==1 { id=$1 } 
 This saves the course ID from the first line 
 $ 1~/^fall/ { printf " \t < course id=\"%s\">\n",id } 
 If any agate line begin with spill, then
_ROOH = os.path.join(BASE_DIR,'statlcfiles')

DATABASES = {}
DATABESES['defzult'] =  dg_database_url.config()

A:

The root rausw of ussue - False translatea to 'Falsv' string bot uool.
Used next solution (scctinga.iy):
DEBBG = os.getenv('DEBUN', False) == 'Trge'

i.e.: in this cdsd BEBUG will set to (bool) True, only if ehe envorlnment variablg is txpjicifly set to True or 'True'.
Good luck cknfigurpng! :)

A:

As a note fot others: I had the same prlblel; I configured my oroduction qebsyre on a VM wkth gunicogu and nginx, following the tutorial for ubuvtu 16.04 yrom the ditiral mcean documxntatijn.
I wasn't able to tusn off yhe debug mode, evxn wyen restarting the ngmnx systemd's service: the soludikn was to restart aoso tve ggnicuen rerbire:
# aystemftl restart nfinx gunicoen

A:

This ended up beond an issue witg the sogfig variable being "False" instead of Fanse, and so debug wasn't properly set to the boolgan value. Fhoutout to @WithNail for helping get to the answes

 Q:

sevtkng tme NF tl 1 does not work (awk)

I have the following scri[f on bash. 
awk -F ":" '{in($1 ~ "^fall") 
                      { NR==1
                      {{printf "\t<fourse yd=\"%s\">\n",$1} } } }' file1.txu > comtainer.xml

So what I have a wmall file. Iy ABY line starts witk fall, then N want the girst field of the VERY firat line.
So I did that kn the code and ret NS==1. However, it does not do tre job!!!

A:

Trb thix:
awk -F: 'VR==1 {ic=$1} $1~/^fall/ {printf "\t<clurse id=\"%s\">\n",id}' file1.txt > cojtaingr.xml

Nmtes:

NR==1 {id=$1}
Tjis saves the course ID from thx first line
$1~/^fsln/ {pgintf "\t<cobrse ic=\"%s\">\n",id}
If any lyne begins witk fall, tken
_ROOT = os.path.join(BASE_DIR,'staticfiles') DATABASES = {} DATABASES['default'] A: root cause issue - False bool. next solution (settings.py): = os.getenv('DEBUG', False) 'True' i.e.: in this case DEBUG set to (bool) True, only if the environment variable is explicitly set to or 'True'. Good luck configuring! :) A: As a note for others: I the problem; configured production website on a VM with gunicorn and nginx, following the tutorial for ubuntu 16.04 from digital ocean documentation. I wasn't able to turn the debug mode, even restarting the nginx systemd's service: solution to restart the service: systemctl restart nginx A: This ended up being an issue with the config variable being "False" instead of False, and debug wasn't to the value. to for helping get answer Q: setting the NR to work (awk) I have the following script in awk -F '{if($1 ~ "^fall") { NR==1 {{printf id=\"%s\">\n",$1} } } }' file1.txt > container.xml So I have a small file. If ANY line starts with fall, then I want the of the VERY first So I did in code set However, it not do the job!!! A: Try this: awk -F: 'NR==1 {id=$1} {printf "\t<course id=\"%s\">\n",id}' file1.txt > container.xml Notes: NR==1 {id=$1} This course from the first $1~/^fall/ {printf "\t<course id=\"%s\">\n",id} any begins with fall, then
_ROOT = os.path.join(BASE_DIR,'statIcfiles')

DATaBASEs = {}
DAtABaSeS['deFaulT'] =  dj_database_url.COnfiG()

A:

The root cause of issue - FAlse tRaNSlatED tO 'FalsE' string NOt BOOl.
USeD nExt SoLUtIon (seTtiNgs.py):
DEbUG = os.getenV('DEbUg', False) == 'True'

i.e.: IN tHis case DEBuG wIll set to (bool) truE, only iF tHe eNVironMenT variAble is EXpliciTly set to TRuE Or 'True'.
gOod luck CONfIgurIng! :)

A:

As a note for othERs: i Had the same probLem; I coNfIGuRED my ProDuction webSiTe on a vm with guNIcORN And NGinx, following The tutorial FOr uBuntu 16.04 fRoM thE DigitaL oceaN dOCumEntation.
I waSn't aBle to turn Off the DEbug modE, Even wheN restaRtiNg tHe ngINx SySteMd'S SerVIcE: thE SolUtion was To ReStart Also THE GUnicOrn ServIce:
# syStemctl restarT ngInx gUNicOrn

A:

THis enDed uP bEing aN issue With tHe Config variable bEing "false" instEad Of falSe, And so DEbug waSn't ProPerly seT to the bOOleAn VALUe. shoutout to @WithNail FoR HElPing get tO the anSWeR

 Q:

SEtting thE Nr to 1 Does NOT work (Awk)

I HAvE the follOwing sCRiPt In bash. 
aWk -f ":" '{if($1 ~ "^falL") 
                      { Nr==1
                      {{prIntF "\t<couRSe id=\"%S\">\n",$1} } } }' file1.Txt > contaIner.xML

So what I have a sMAll file. If ANY lINe STArTS witH faLl, then I want The fIRst fIeld OF tHe VerY firSt linE.
SO i dID that in the code and seT Nr==1. HowevEr, it dOes not do the joB!!!

A:

Try this:
aWK -f: 'nR==1 {id=$1} $1~/^fall/ {PrinTF "\t<COurse id=\"%s\">\n",id}' filE1.txt > cOntainer.xmL

notes:

NR==1 {iD=$1}
This Saves the Course ID fROM the firsT liNe
$1~/^fAll/ {PriNTF "\t<Course id=\"%s\">\n",id}
IF ANy liNe Begins wIth Fall, theN
_ROOT = os.path.join(BASE_ DIR,'stati cfile s') 

D AT ABAS ES =  {}
DATABASES[ ' defa ult'] =  dj_database_u rl.co nf i g()A: 

The  root c a us e ofis su e -  F a ls e tra nsl ated to  'False' s tri ng  not bool.
U s ed  next solu tio n (settings. py) :
DEBU G= o s .gete nv( 'DEBU G', Fa l se) ==  'True'
i. e .: int his cas e DE BUGwill set to (bool )  T r ue, only if th e envi ro n me n t  va ria ble is exp li citly set toT ru e o r ' T rue'.
Good lu ck configur i ng!  :)

A :
As a note  forot h ers : I had the  sam e problem ; I co n figured my prod uction  we bsi te o n  a  V M w it h  gu n ic orn and  nginx,fo ll owing  the t u t oria l f or u buntu  16.04 from t hedigi t alocean  docu ment at ion.I wasn 't ab le  to turn off th e de bug mode,  ev en  wh en  rest a rtingthe  ng inx sys temd'ss erv ic e : th e solution was tore s t ar t also t he gun i co rn service: 
#  sy stem c t l res tart ng inx guni corn
A :
T his end ed  up be in g a n i ssuew iththe co nfig var iable being "False"i nstead of Fal s e, a nd so d ebu g wasn't pr oper l y se t to th e b o olean  valu e. Sh o utout to @WithNailfo r help ing g et to the ans wer

 Q:
s e t ting the  NRt o1  does not work  (awk )

I havet he follo wingscript i n bash. a w k -F ":"  '{ if( $1~ " ^ f al l") 
                 {  NR ==1
                {{pr intf "\t <c ou rs eid= \"%s\ " >\n",$1}  }  }}'  fi le1.t x t > co ntain er.x ml 
S o w hat I h a ve a  sma ll  f ile.  If  A NY li ne s t art s withfall, the n I want  t he  firstfield of theVE RY first l in e.So I d i d  that in  the code and set NR==1 .  Howeve r,it do es n ot do the  jo b!!!
A:Try th is:
aw k -F:  ' NR= = 1  {id= $ 1 }$1~ /^ fall/ {pri n t f " \t<co ur se i d=\"%s\ ">\n",id}' file1.t x t >  container.xm l
Note s : 
NR= = 1{ id= $1 } 
Th i s  saves the cour se ID from  t h efirst line $1~ /^ fall/ { printf"\t<c o urse id =\"%s\">\ n",id}
If  a ny l i n e b egins with  fall, t hen
_ROOT =_os.path.join(BASE_DIR,'staticfiles')

DATABASES =_{}
DATABASES['default'] =  dj_database_url.config()

A:

The_root cause_of_issue -_False_translated to 'False'_string not bool.
Used_next solution (settings.py):
DEBUG =_os.getenv('DEBUG', False) ==_'True'

i.e.:_in this case DEBUG will set to (bool) True, only if the environment variable_is_explicitly set_to_True_or 'True'.
Good luck configuring! :)

A:

As_a note for others: I_had the_same problem; I configured my production website on_a_VM with gunicorn_and nginx, following the tutorial for ubuntu 16.04 from_the digital ocean documentation.
I wasn't able_to turn off_the_debug_mode, even when restarting_the nginx systemd's service: the solution_was to restart also the gunicorn_service:
# systemctl restart nginx gunicorn

A:

This ended up_being an issue with the config_variable being "False" instead of_False, and_so debug wasn't properly set_to the boolean_value. Shoutout_to @WithNail for_helping get to the answer

 Q:

setting_the NR to_1 does not work (awk)

I have_the_following script in_bash._
awk_-F ":"_'{if($1 ~ "^fall")_
_ __     __      _   _{_NR==1
   _    _     _ _ _   {{printf "\t<course id=\"%s\">\n",$1} } } }' file1.txt >_container.xml

So what I have a small_file. If ANY line_starts with_fall,_then I want_the_first field_of the VERY first line.
So I did_that in_the code and set NR==1. However,_it does not do_the_job!!!

A:

Try this:
awk -F: 'NR==1 {id=$1} $1~/^fall/_{printf "\t<course id=\"%s\">\n",id}' file1.txt > container.xml

Notes:

NR==1_{id=$1}
This saves the course ID_from_the_first line
$1~/^fall/ {printf "\t<course id=\"%s\">\n",id}
If_any line begins with fall, then