Re: Syncing two django applications via cURL

2008-11-15 Thread Kurczak

Also, is there some way to make this action "transaction like" ? To be
sure that every action was synchronised?

--~--~-~--~~~---~--~~
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: Syncing two django applications via cURL

2008-11-13 Thread Kurczak

On 13 Lis, 19:23, Ryan Nowakowski <[EMAIL PROTECTED]> wrote:
> You could create a view that accepts a post that includes the following:
>   * admin username (for auth)
>   * admin password (for auth)
>   * username
>   * user password
>   * other attrs...
>
> Then from your admin hooks, you can do an http post to the other sites
> using httplib[1] keeping stuff in sync.
>
> 1.http://www.python.org/doc/2.5.2/lib/httplib-examples.html
>
> - Ryan
That sounds like a pretty nice idea. I believe it's a bit cleaner than
trying to force my way with curl.
I'm still not sure where to slip it, would User.save() be suitable?

Also, this could take a bit, maybe I should consider another thread/
process?


--~--~-~--~~~---~--~~
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: Syncing two django applications via cURL

2008-11-13 Thread Kurczak



On 13 Lis, 19:17, "Dj Gilcrease" <[EMAIL PROTECTED]> wrote:
> Is there a profound reason you are not using the same DB for all the
> sites, and just using django.contrib.sites to keep the content
> separated between them?
Yes, client's request.

--~--~-~--~~~---~--~~
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: Syncing two django applications via cURL

2008-11-13 Thread Ryan Nowakowski

You could create a view that accepts a post that includes the following:
  * admin username (for auth)
  * admin password (for auth)
  * username
  * user password
  * other attrs...

Then from your admin hooks, you can do an http post to the other sites
using httplib[1] keeping stuff in sync.

1. http://www.python.org/doc/2.5.2/lib/httplib-examples.html

- Ryan

On Thu, Nov 13, 2008 at 10:13:25AM -0800, Kurczak wrote:
> 
> Hello everyone,
> I've got this unusual problem - I've got few django sites, and I need
> to synchronize Users and profiles between them. (it's a closed site
> where only admins create accounts so OpenID or similar won't help) I
> thought that probably the easiest way is to hook somewhere in admin
> interface (add, edit, delete actions) and run a cURL script that would
> log in to the rest of the sites as another user and execute same
> action. (I hope my description is understandable)
> Is it by any chance a good solution? If so, where is the best place to
> hook this?
> 
> I'd be profoundly grateful for any insights on this.
> 
> Thanks,
> Kurczak
> 
> 
> > 

--~--~-~--~~~---~--~~
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: Syncing two django applications via cURL

2008-11-13 Thread Dj Gilcrease

Is there a profound reason you are not using the same DB for all the
sites, and just using django.contrib.sites to keep the content
separated between them?

Dj Gilcrease
OpenRPG Developer
~~http://www.openrpg.com

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