Friday, October 7, 2022

META data differs between development runserver and Apache

I am a Django Newbie,

My problem is simple, when I run my code on the built in development server using Visual Studio Code on the server machine, my code works. When I run the same code on the same server using Apache the code fails. 

Specifically:
var1=(request.META)
var2=var1['LOGNAME']
or 
var2=var1['TZ']

IN both instances the name LOGNAME and TZ do not exist when the code is run on the apache server. (I get a Keyerror - does not exist) What must be happening is the data in var1 differs between the development server and apache.  

My question is why? I suspect it has something to do with WSGI?

Any clue will be greatly appriciated.

Moose
  

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/795169b6-22f8-4ae8-8c3c-e7d71855b555n%40googlegroups.com.

No comments:

Post a Comment