Hi,

i have the following domain www.foo.com and an alias foo.com
When i post a comment i want to redirect to the submit page so i use a
wrapper for this:

def comment_posted( request ):
    if request.GET.has_key('c'):
        comment = get_object_or_404(Comment, pk=request.GET['c'])
        return HttpResponseRedirect( comment.get_absolute_url() )
    return HttpResponseRedirect( "/" )

So far so good,

It looks at Site domain name which is set to "edoboard.com"

The problem if that when user is logged in on www.edoboard.com, after
a comment is posted he is redirected to foo.com/view/posting and it
seems to be a completely different story since he is not logged in on
edoboard.com !. I want edoboard.com and www.edoboard.com to share the
same sessions.

Using the referer is not a solution because in case the comment is
invalid i get to the page /comments/post/ to edit and fix it, where
the referer become invalid :/.

In any case my Apache & nginx conf are following:

Nginx

server {
    listen   11.111.111.111:80;
    server_name www.edoboard.com edoboard.com;

Apache
<VirtualHost 127.0.0.1:80>
    ServerAdmin cou...@gmail.com
    ServerName www.edoboard.com
    ServerAlias edoboard.com
   ........

Thanks

--~--~---------~--~----~------------~-------~--~----~
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 
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