Yes, this was the problem. At some point early in my attempts I got the idea
that linking up Django to a production web server required writing a separate
wsgi.py script. Wrong. Replaced the wsgi.py with the default Django wsgi.py for
the project and everything seems resolved. Thank you.
--
On 2018-07-21, abc abc wrote:
>> I think one of the main issues is that you don't seem to have decided
>> whether you're writing a WSGI application or a Django application.
>
> Yes, I suppose I thought Django had to use wsgi to process requests,
> I didn't know there were 'two' options here.
> I think one of the main issues is that you don't seem to have decided
> whether you're writing a WSGI application or a Django application.
Yes, I suppose I thought Django had to use wsgi to process requests, I didn't
know there were 'two' options here. Does your example represent one or the
> I think one of the main issues is that you don't seem to have decided
> whether you're writing a WSGI application or a Django application.
Yes, I suppose I thought Django had to use wsgi to process requests, I didn't
know there were 'two' options here. Does your example represent one or the
On 2018-07-20, abc abc wrote:
> Well, I'm so messed up between so many sources and tutorials I don't
> know which way is up.
I think one of the main issues is that you don't seem to have decided
whether you're writing a WSGI application or a Django application.
WSGI:
def
Well, I'm so messed up between so many sources and tutorials I don't know which
way is up.
References to environ variable:
https://www.python.org/dev/peps/pep-0333/
https://stackoverflow.com/questions/16774952/wsgi-whats-the-purpose-of-start-response-function
I read that I have to have a file
On 2018-07-20 12:39:38 -0700, abc abc wrote:
> I am trying the simplest of examples below to set and read a cookie. I
> am using the Django framework, but I have also tried with vanilla
> python cookies and os.environ. I have posted elsewhere, but this
> hasn't gotten much attention, so I'd really
You can read cookies from the request via the request.COOKIES dictionary.
See the documentation here:
https://docs.djangoproject.com/en/2.0/ref/request-response/#django.http.HttpRequest.COOKIES
You won't find them in an environment variable, which is shared
process-wide and across all requests,
On Thu, Dec 31, 2009 at 1:10 AM, Carsten Haese carsten.ha...@gmail.comwrote:
Victor Subervi wrote:
You know, neither one of those tutorials I followed gave clear, or any,
instruction about putting a
print cookie
statement in the header! How misleading!
Don't blame the tutorials for
I'm curious. Are there other instances where code needs to be inserted into
the header as in the print cookie to get it to be baked on the user's PC?
TIA,
beno
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Dec 29, 2009 at 3:43 PM, Carsten Haese carsten.ha...@gmail.comwrote:
Victor Subervi wrote:
Hi;
I have these lines:
cookie = os.environ.get('HTTP_COOKIE')
if not cookie:
cookie = Cookie.SimpleCookie()
cExpires, cPath, cComment, cDomain, cMaxAge, cVersion =
Victor Subervi wrote:
On Tue, Dec 29, 2009 at 3:43 PM, Carsten Haese carsten.ha...@gmail.com
mailto:carsten.ha...@gmail.com wrote:
You apparently haven't followed the tutorials carefully enough. You do
know that a cookie is a piece of information that's stored in your
browser,
On Wed, Dec 30, 2009 at 9:56 AM, Carsten Haese carsten.ha...@gmail.comwrote:
So, guess again. The trivial example has three more lines of code. One
of them is unlike any line you have in your code. That's the line
responsible for producing the Set-Cookie header, and that's the line
you're
Victor Subervi wrote:
Here again is my code:
#! /usr/bin/python
import string
import cgitb; cgitb.enable()
import MySQLdb
import cgi
import sys,os
sys.path.append(os.getcwd())
from login import login
import datetime, Cookie, random
from particulars import title
from templateFrame
Carsten Haese wrote:
Victor Subervi wrote:
[...]
Pardon me for not being able to read your mind. The code you're now
posting is significantly more code than your first post included. The
line that I had determined to be missing is in fact not missing, you
just didn't bother to post your
On Wed, Dec 30, 2009 at 11:54 AM, Carsten Haese carsten.ha...@gmail.comwrote:
Victor Subervi wrote:
Here again is my code:
#! /usr/bin/python
import string
import cgitb; cgitb.enable()
import MySQLdb
import cgi
import sys,os
sys.path.append(os.getcwd())
from login import
On Wed, Dec 30, 2009 at 12:19 PM, Steve Holden st...@holdenweb.com wrote:
Carsten Haese wrote:
I will point out again, without the least expectation that it will do
any good, that the reason this problem has occurred is that Victor
simply refuses to take the time to absorb the principles of
Victor Subervi wrote:
I've revised the code thus:
cookie = os.environ.has_key('HTTP_COOKIE')
if not cookie:
cookie = Cookie.SimpleCookie()
cExpires, cPath, cComment, cDomain, cMaxAge, cVersion = myCookie()
cookie['lastvisit'] = str(time.time())
Victor Subervi wrote:
Comments from a left-brain thinker without any concept of how difficult
it is for a right-brain thinker to think like you. Care to compare
poetry? I'd bury you.
That may be so, but the difference is that Steve is not trying to earn a
living writing poetry as far as I
On Wed, Dec 30, 2009 at 12:43 PM, Carsten Haese carsten.ha...@gmail.comwrote:
Anyway, the likely answer is that you guessed incorrectly. As I said
before, you need to make sure that the cookie is printed as part of the
page headers. I'll give you one last hint: The page header is where
you're
On Wed, Dec 30, 2009 at 12:51 PM, Carsten Haese carsten.ha...@gmail.comwrote:
Victor Subervi wrote:
Comments from a left-brain thinker without any concept of how difficult
it is for a right-brain thinker to think like you. Care to compare
poetry? I'd bury you.
That may be so, but the
On Wed, Dec 30, 2009 at 12:51 PM, Carsten Haese carsten.ha...@gmail.comwrote:
Victor Subervi wrote:
Comments from a left-brain thinker without any concept of how difficult
it is for a right-brain thinker to think like you. Care to compare
poetry? I'd bury you.
That may be so, but the
You know, neither one of those tutorials I followed gave clear, or any,
instruction about putting a
print cookie
statement in the header! How misleading!
beno
--
http://mail.python.org/mailman/listinfo/python-list
Victor Subervi wrote:
You know, neither one of those tutorials I followed gave clear, or any,
instruction about putting a
print cookie
statement in the header! How misleading!
beno
At the risk of repeating myself, if you understood more about what you
are trying to do you wouldn't have
Victor Subervi wrote:
You know, neither one of those tutorials I followed gave clear, or any,
instruction about putting a
print cookie
statement in the header! How misleading!
Don't blame the tutorials for your failure to read them carefully. The
tutorial you mentioned
Victor Subervi wrote:
Hi;
I have these lines:
cookie = os.environ.get('HTTP_COOKIE')
if not cookie:
cookie = Cookie.SimpleCookie()
cExpires, cPath, cComment, cDomain, cMaxAge, cVersion = myCookie()
cookie['lastvisit'] = str(time.time())
cookie['lastvisit']['expires']
On May 16, 9:21 am, Larry Bates [EMAIL PROTECTED] wrote:
I'm struggling with a project using mechanize and cookies to screen scape a
website. The site requires a client created cookie for authentication. Below
is the code I'm attempting to use with the traceback I'm getting:
import Cookie
Larry Bates wrote:
I'm struggling with a project using mechanize and cookies to screen scape a
website. The site requires a client created cookie for authentication.
Are you sure that is correct? As far as I know, the usual course of
events is for a site to set a cookie header in the response
28 matches
Mail list logo