On Mon, Dec 6, 2010 at 4:42 PM, bc <craft.br...@gmail.com> wrote:

> Is there any simple way to use django authentication/authorization to
> control access to an existing (not django) cgi?
>
> I could use subprocess.Popen to invoke the cgi after checking
> authorization, but the environment needs to be set up to look like a
> cgi call (setting QUERY_STRING, etc.). Is there a better way?
>
>
I don't know if you could do some special trick with an HttpRequest or some
kind of redirect from one view to hit the cgi script with the automatically
created (HttpRequest) data.  I'm guessing the answer is no or more trouble
than it would be worth, but that's just a guess.

I would say you really have two options.

1.  Implement the script in Python, and bring it in under Django.

2.  Craft your own Http Request header with Python's libraries and point it
to the cgi script.


> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to