Tuesday, June 22, 2010

Re: Random

in my application the file .dat and the image...i save in a directory in my computer.....so i'm having problem when two people access the same time.....

On Tue, Jun 22, 2010 at 3:01 PM, orokusaki <flashdesignpro@gmail.com> wrote:
Name each person's files using:

import uuid
filename = uuid.uuid4()


On Jun 22, 11:30 am, Waleria <waleriantu...@gmail.com> wrote:
> my application doesn't use DB....not able to do this without using the
> Random? ... without DB?
>
> On 22 jun, 14:22, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
>
> > On Tue, Jun 22, 2010 at 12:11 PM, Waleria <waleriantu...@gmail.com> wrote:
> > > I have a system that generate graphs and files .dat. However,  i'm
> > > having a problem, when two people access the system simultaneously may
> > > happen that the graph of a person to replace the second person, what
> > > can I do to make it not happen?
>
> > you have to get some way to keep both users separate.  one approach
> > would be to create DB records for each task, and use the record ID as
> > part of the file name.  another would be to use the session ID.
>
> > --
> > Javier

--
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+unsubscribe@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-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment