Re: serving django project through ssl and without ssl at the same time?!

2007-10-31 Thread lmierzej

Thank you for your answer! To be more specific - I need to serve some
parts of the same
django project:

a) through SSL
b) without SSL
c) with SSL and client certificates authentication (SSLVerifyClient)

Is it possible without mod_wsgi?  Can use 3 VirtualHost configuration
containers with plain mod_python? Something like this:


ServerName site.com
... other options
...



ServerName site.com
... other options, including SSL
...



ServerName site.com
... other options, including SSL and SSLVerifyClient (clients
certificates authentication)
...


But how to distinguish the one with SSL from the other with SSL and
SSLVerifyClient?

Thank you for your advises and time!

On 30 Paź, 22:59, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
> On Oct 31, 6:50 am, lmierzej <[EMAIL PROTECTED]> wrote:
>
> > > maybe I should just create two apache virtual hosts pointing to the
> > > same django project?
>
> > According to instructions herehttp://www.djangosnippets.org/snippets/240/
> > there should be two different apache virtual hosts pointing to the
> > same django project.
>
> > Anyone using some other solutions?
>
> Those instructions are referring to one particular providers setup and
> the way they configure things through a web panel. At the Apache
> level, it isn't strictly two virtual hosts, but two VirtualHost
> configuration containers, one for each port. Ie., 80 and 443. Thus if
> using mod_wsgi you would have:
>
> 
> ServerName site.com
> ... other options
>
> Alias /media/ /usr/local/django/mysite/media/
>
> 
> Order deny,allow
> Allow from all
> 
>
> WSGIScriptAlias / /usr/local/django/mysite/apache/django.wsgi
>
> 
> Order deny,allow
> Allow from all
> 
> 
>
> 
> ServerName site.com
> ... other options, including and SSL specific ones if necessary.
>
> Alias /media/ /usr/local/django/mysite/media/
>
> 
> Order deny,allow
> Allow from all
> 
>
> WSGIScriptAlias / /usr/local/django/mysite/apache/django.wsgi
>
> 
> Order deny,allow
> Allow from all
> 
> 
>
> In other words, configuration is basically duplicated although SSL
> VirtualHost container may have some specific SSL related
> configuration.
>
> In mod_wsgi, although the application entry point is defined twice,
> mod_wsgi will recognise that they are on 80/443 for the same site and
> ensure that only one Django instance runs in each Apache process, but
> with both HTTP and HTTPS requests going to it. Whether the original
> request was HTTP or HTTPS will be obtained from the is_secure()
> function within Django API.
>
> Graham


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



Re: serving django project through ssl and without ssl at the same time?!

2007-10-30 Thread lmierzej

> maybe I should just create two apache virtual hosts pointing to the
> same django project?

According to instructions here http://www.djangosnippets.org/snippets/240/
there should be two different apache virtual hosts pointing to the
same django project.

Anyone using some other solutions?


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



serving django project through ssl and without ssl at the same time?!

2007-10-29 Thread lmierzej

hi,

is it possible to configure apache to serve some parts of the same
django projects through SSL and some without SSL?

maybe I should just create two apache virtual hosts pointing to the
same django project?


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



Accessing SSL client certificate variables

2007-10-17 Thread lmierzej

Is there a way to access apache/mod_python's SSL client certificate
variables in django?

I found only this: http://code.djangoproject.com/ticket/2938 - is it
really not possible without patching django source code?


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



Re: pydev code completion problem

2007-10-14 Thread lmierzej

I guess it all is just not possible in dynamically typed language...

On Oct 14, 3:07 pm, lmierzej <[EMAIL PROTECTED]> wrote:
> hi,
> in models.py I have Poll class...
>
> when in views.py I do:
> poll = Poll()
> then when typing 'poll.' (just after typing '.') I get full and proper
> code completion and that's just great...
>
> but when I have something like this in views.py:
> def poll(request, poll_id):
> poll = get_object_or_404(Poll, pk=poll_id)
> now when typing 'poll.' I get no code completion... :-(
>
> Why is that? In SPE Python IDE both examples work just fine...
> Does anyone use pydev and can check if he get proper code completion
> after using 'get_object_or_404'?
>
> Thank you advance!


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



Re: do you use pydev for django development?

2007-10-14 Thread lmierzej

Thank you very much for your replay!

I understand it now... until get_object_or_404() is invoked how can
anyone know what would it return... am I thinking correct?

On Oct 14, 9:46 pm, Andrew <[EMAIL PROTECTED]> wrote:
> So much of models are generated on the fly, I usually count it as luck
> if I get any code completion at all. I don't think any other IDE will
> help you here.
>
> On Oct 14, 8:03 am, lmierzej <[EMAIL PROTECTED]> wrote:
>
> > hi,
> > I need advise...
> > i've started using pydev for django development
> > but it have some quirks...
>
> > for example if i retrieve my model's objects by invoking
> > get_object_or_404() function
> > code completion doesn't work on object retrieved with this function...
> > maybe it is just me or pydev shortcoming?...  Can anyone confirm or
> > deny this?
>
> > does anyone know other ide then pydev in which this would work?
>
> > Thank you for your time!


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



do you use pydev for django development?

2007-10-14 Thread lmierzej

hi,
I need advise...
i've started using pydev for django development
but it have some quirks...

for example if i retrieve my model's objects by invoking
get_object_or_404() function
code completion doesn't work on object retrieved with this function...
maybe it is just me or pydev shortcoming?...  Can anyone confirm or
deny this?

does anyone know other ide then pydev in which this would work?

Thank you for your time!


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



[django 0.96] pydev code completion problem

2007-10-14 Thread lmierzej

hi,
in models.py I have Poll class...

when in views.py I do:
poll = Poll()
then when typing 'poll.' (just after typing '.') I get full and proper
code completion and that's just great...

but when I have something like this in views.py:
def poll(request, poll_id):
poll = get_object_or_404(Poll, pk=poll_id)
now when typing 'poll.' I get no code completion... :-(

Why is that? In SPE Python IDE both examples work just fine...
Does anyone use pydev and can check if he get proper code completion
after using 'get_object_or_404'?

Thank you advance!


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



Re: django admin -> documentation -> views

2007-10-13 Thread lmierzej

Thank you very much - documentation on django website is little
misleading... I thought I would get something 'automagicaly' :-)


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



django admin -> documentation -> views

2007-10-12 Thread lmierzej

hi, I'm using django 0.96
when I log into django admin, select documentation and then my views
(http://localhost:8000/admin/doc/views),
I can see that there is no information about my views (every view
contain only one link - Back to Views Documentation)

anyone know why is that?

thank you for your time,
lmierzej


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