Re: Upload files to separate server from Django

2008-02-25 Thread [EMAIL PROTECTED]

Cool, thanks or the help guys!  I'm going to try to figure out this
JellyRoll thing and bypass all of this by using Flickr...for now at
least...

On Feb 25, 6:57 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm not certain about the practicality of this (it may have security
> or performance implications that i'm unaware of), but i've often
> thought about mounting the media server as a network drive on your
> dynamic server and giving Django full read-write privileges. This
> would mean that you don't actually have to write any special code to
> use your separate server since Django wouldn't need to know that the
> file is going somewhere completely different.
>
> On Feb 25, 9:34 pm, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > I've been trying to find an answer to this question for a while and it
> > seems like there are some ideas floating around but no definite
> > answer.
>
> > I have a photo site hosted with WebFaction that I have all my django
> > code running on.  However, I have another host that I'd like to serve
> > all the media for the site from.  This isn't a problem for things like
> > CSS and even core site images but obviously as it is right now, I
> > can't upload files from the Django admin to the same server that my
> > static media is serving from.
>
> > Is there a way to set up django so the files will upload to a
> > different server entirely from where django is running?
>
> > I've had ideas of using rsync or scp but I'd like this to be as
> > streamlined as possible.  With rsync or scp, I'd need to have it check
> > when a new file is added to a folder on my WebFaction account and then
> > automatically transfer that file to my other host and then delete that
> > file from WebFaction...which I think would be pretty complex to set
> > up.
>
> > Another option is using Amazon S3 which I've seen working for other
> > people but I'd really like to just use what I already have and not
> > depend on S3.
>
> > Any ideas?
>
> > Thanks in 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: Upload files to separate server from Django

2008-02-25 Thread [EMAIL PROTECTED]

I'm not certain about the practicality of this (it may have security
or performance implications that i'm unaware of), but i've often
thought about mounting the media server as a network drive on your
dynamic server and giving Django full read-write privileges. This
would mean that you don't actually have to write any special code to
use your separate server since Django wouldn't need to know that the
file is going somewhere completely different.

On Feb 25, 9:34 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I've been trying to find an answer to this question for a while and it
> seems like there are some ideas floating around but no definite
> answer.
>
> I have a photo site hosted with WebFaction that I have all my django
> code running on.  However, I have another host that I'd like to serve
> all the media for the site from.  This isn't a problem for things like
> CSS and even core site images but obviously as it is right now, I
> can't upload files from the Django admin to the same server that my
> static media is serving from.
>
> Is there a way to set up django so the files will upload to a
> different server entirely from where django is running?
>
> I've had ideas of using rsync or scp but I'd like this to be as
> streamlined as possible.  With rsync or scp, I'd need to have it check
> when a new file is added to a folder on my WebFaction account and then
> automatically transfer that file to my other host and then delete that
> file from WebFaction...which I think would be pretty complex to set
> up.
>
> Another option is using Amazon S3 which I've seen working for other
> people but I'd really like to just use what I already have and not
> depend on S3.
>
> Any ideas?
>
> Thanks in 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: Upload files to separate server from Django

2008-02-25 Thread Leonel Nunez

>
> On Mon, 2008-02-25 at 13:34 -0800, [EMAIL PROTECTED] wrote:
>
> [...]
>> I've had ideas of using rsync or scp but I'd like this to be as
>> streamlined as possible.  With rsync or scp, I'd need to have it check
>> when a new file is added to a folder on my WebFaction account and then
>> automatically transfer that file to my other host and then delete that
>> file from WebFaction...which I think would be pretty complex to set
>> up.
>
> You're over-estimating the complexity. Run rsync from a cronjob and then
> periodically clean up the directory on the source machine (maybe every
> few days or weeks or whatever). Rsync isn't going to copy stuff that
> already exists, so you can leave the source around for a while.
>
> Malcolm
>
> --
> Why be difficult when, with a little bit of effort, you could be
> impossible.
> http://www.pointy-stick.com/blog/
>
>
> >
>


And what if you store the images on the  database  as part of your record ?
This will give you integrity


Leonel


--~--~-~--~~~---~--~~
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: Upload files to separate server from Django

2008-02-25 Thread Malcolm Tredinnick


On Mon, 2008-02-25 at 13:34 -0800, [EMAIL PROTECTED] wrote:

[...]
> I've had ideas of using rsync or scp but I'd like this to be as
> streamlined as possible.  With rsync or scp, I'd need to have it check
> when a new file is added to a folder on my WebFaction account and then
> automatically transfer that file to my other host and then delete that
> file from WebFaction...which I think would be pretty complex to set
> up.

You're over-estimating the complexity. Run rsync from a cronjob and then
periodically clean up the directory on the source machine (maybe every
few days or weeks or whatever). Rsync isn't going to copy stuff that
already exists, so you can leave the source around for a while.

Malcolm

-- 
Why be difficult when, with a little bit of effort, you could be
impossible. 
http://www.pointy-stick.com/blog/


--~--~-~--~~~---~--~~
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: Upload files to separate server from Django

2008-02-25 Thread [EMAIL PROTECTED]

There is currently a ticket for this: http://code.djangoproject.com/ticket/5361
I'm not sure what the status of it is, but for usage(with manual
uploads, or if you try the patch), check out: 
http://www.b-list.org/weblog/2008/feb/07/media/

On Feb 25, 3:34 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I've been trying to find an answer to this question for a while and it
> seems like there are some ideas floating around but no definite
> answer.
>
> I have a photo site hosted with WebFaction that I have all my django
> code running on.  However, I have another host that I'd like to serve
> all the media for the site from.  This isn't a problem for things like
> CSS and even core site images but obviously as it is right now, I
> can't upload files from the Django admin to the same server that my
> static media is serving from.
>
> Is there a way to set up django so the files will upload to a
> different server entirely from where django is running?
>
> I've had ideas of using rsync or scp but I'd like this to be as
> streamlined as possible.  With rsync or scp, I'd need to have it check
> when a new file is added to a folder on my WebFaction account and then
> automatically transfer that file to my other host and then delete that
> file from WebFaction...which I think would be pretty complex to set
> up.
>
> Another option is using Amazon S3 which I've seen working for other
> people but I'd really like to just use what I already have and not
> depend on S3.
>
> Any ideas?
>
> Thanks in 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
-~--~~~~--~~--~--~---