I agree with Graham because you don't know where python will be
executed from what would the path be relative to?

On Feb 22, 9:33 am, "Justin Lilly" <[EMAIL PROTECTED]> wrote:
> I would personally vote on making it an optional parameter if RELATIVE_FIELD
> (or something like that) is present. If it isn't present, require it just
> like always.
> -justin
>
> On Fri, Feb 22, 2008 at 9:46 AM, Graham Carlyle <
>
>
>
> [EMAIL PROTECTED]> wrote:
>
> > In your example I think RELATIVE_FIELD would be relative to the django
> > python process's current working directory which seems a bit arbitrary.
> > Having an absolute path parameter seems a good thing, but storing this
> > prefix for each record seems redundant and inflexible.
>
> > Graham
>
> > On Fri, 2008-02-22 at 09:05 -0500, Justin Lilly wrote:
> > > What would stop you from doing something akin to:
>
> > > upload = model.FilePathField(path=RELATIVE_FIELD, match="foo.*",
> > > recursive=True)
>
> > > where RELATIVE_FIELD is defined in your settings.py file? Perhaps I've
> > > missed the mark on this.. I'm relatively new to django-dev
> > > discussions.
>
> > > -justin
>
> > > On Fri, Feb 22, 2008 at 6:16 AM, Graham Carlyle
> > > <[EMAIL PROTECTED]> wrote:
>
> > >         I'd like to request that FilePathField should have an extra
> > >         option that
> > >         causes it to only save a relative path (to the path
> > >         parameter), say
> > >         called "relative".
>
> > >         Having an absolute path stored makes it harder to move data
> > >         between
> > >         machines that are set up differently (say development and
> > >         production).
> > >         In this circumstance I would typically set the path parameter
> > >         from the
> > >         settings file.
>
> > >         The "relative" argument could default to False to keep the
> > >         current
> > >         behaviour by default. Actually i can't think when you would
> > >         want
> > >         absolute paths but maybe someone does.
>
> > >         Shall I create a ticket (and possibly a patch) for this? or am
> > >         I missing
> > >         something?
>
> > >         cheers,
> > >         Graham
>
> > > --
> > > Justin Lilly
> > > Web Developer
>
> --
> Justin Lilly
> Web Developer
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to