Do the solutions identified in this ticket help you out?

http://bitbucket.org/chris1610/satchmo/issue/783/dirname-and-media_root-have-slash-issues-on

Let us know if it works so we can get it incorporated in trunk.

-Chris

On Tue, Dec 8, 2009 at 8:47 AM, M <[email protected]> wrote:

> Hi,
>
> I am developing under Vista and have encountered the same problem
> also. The problem appears to be in the the start up scripts -
> basically it seems to run four times! For example with some print
> statements added in settings.py and localsettings.py I get:
>
> D:\temp\debug_store\store>python manage.py runserver 8001
> MEDIA_ROOT: D:\temp\debug_store\store\static\
> DATABASE_NAME: D:\temp\debug_store\store\simple.db
> MEDIA_ROOT: D:\temp\debug_store\store\..\store\static\
> DATABASE_NAME: D:\temp\debug_store\store\simple.db
> MEDIA_ROOT: D:\temp\debug_store\store\static\
> DATABASE_NAME: D:\temp\debug_store\store\simple.db
> MEDIA_ROOT: D:\temp\debug_store\store\..\store\static\
> DATABASE_NAME: D:\temp\debug_store\store\simple.db
> Validating models...
> .
> .
> .
>
> Note that after the first pass it modifies the MEDIA_ROOT stupidly -
> which inturn breaks the utils library in satchmo_utils.thumbnail.
> Namely the _get_path_from_url method.
>
> Any thoughts on why the settings file is evaluated 4 times?
>
> Regards,
>
> Michael
>
>
> On Dec 1, 9:05 am, cc <[email protected]> wrote:
> > Actually, this problem is still present.  I have tried all
> > combinations with 0.9 and no matter what, I can't get the images to
> > show up.  Is your dev environment in UNIX?  I don't know if this is a
> > sorl-thumbnail problem or satchmo related.  Any insight is greatly
> > appreciated.
> >
> > Also, when I upload an image it puts it in the db as /images/
> > XXXXXX.jpg.. is this correct or should it be the full absolute path?
> > When I try to delete an image it says Access Denied trying to delete /
> > images/....
> >
> > On Nov 28, 2:40 pm, cc <[email protected]> wrote:
> >
> > > Figured out the problem.  It is because os.path.dirname() in windows
> > > generated C:/ instead of c:/ which sorl-thumbnail uses to determine
> > > the relative path.
> >
> > > On Nov 28, 1:37 pm, cc <[email protected]> wrote:
> >
> > > > I noticed the full path to the image is being stored in the table.
> I
> > > > thought only the relative path to MEDIA_ROOT should be stored?
> >
> > > > On Nov 27, 9:03 pm, cc <[email protected]> wrote:
> >
> > > > > Hi Chris,
> >
> > > > >   Not sure if that is really the problem, I think something else
> might
> > > > > be at work here.. this is what I get for any request on thumbnail
> > > > > URLs:
> >
> > > > > [27/Nov/2009 21:00:11] "GET
> /static/c:/users/cc/workspace/newstore/src/
> > > > > store/static/images/users/cc/workspac
> > > > > e/newstore/src/store/static/images/users/cc/workspace/newstore/src/
> > > > > store/static/images/users/cc/workspace/ne
> > > > >
> wstore/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/newsto
> > > > > re/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/newstore/s
> > > > >
> rc/store/static/images/users/cc/workspace/newstore/src/store/static/
> > > > > images/users/cc/workspace/newstore/src/s
> > > > >
> tore/static/images/users/cc/workspace/newstore/src/store/static/images/
> > > > > users/cc/workspace/newstore/src/store
> > > > > /static/images/users/cc/workspace/newstore/src/store/static/images/
> > > > > users/cc/workspace/newstore/src/store/sta
> > > > >
> tic/images/users/cc/workspace/newstore/src/store/static/images/users/
> > > > > cc/workspace/newstore/src/store/static/
> > > > >
> images/users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/imag
> > > > > es/users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/images/u
> > > > >
> sers/cc/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users
> > > > > /cc/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/mar
> > > > > c/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/cc
> > > > > n/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/cc/wo
> > > > >
> rkspace/newstore/src/store/static/images/users/cc/workspace/newstore/
> > > > > src/store/static/images/users/cc/worksp
> > > > >
> ace/newstore/src/store/static/images/users/cc/workspace/newstore/src/
> > > > > store/static/images/users/cc/workspace/
> > > > >
> newstore/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/news
> > > > > tore/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/newstore
> > > > >
> /src/store/static/images/users/cc/workspace/newstore/src/store/static/
> > > > > images/users/cc/workspace/newstore/src
> > > > > /store/static/images/users/cc/workspace/newstore/src/store/static/
> > > > > images/users/cc/workspace/newstore/src/sto
> > > > >
> re/static/images/users/cc/workspace/newstore/src/store/static/images/
> > > > > users/cc/workspace/newstore/src/store/s
> > > > >
> tatic/images/users/cc/workspace/newstore/src/store/static/images/users/
> > > > > cc/workspace/newstore/src/store/stati
> > > > >
> c/images/users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/im
> > > > > ages/users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/images
> > > > > /users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/images/use
> > > > >
> rs/cc/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/m
> > > > > cc/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/cc
> > > > > c/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/cc/
> > > > >
> workspace/newstore/src/store/static/images/users/cc/workspace/newstore/
> > > > > src/store/static/images/users/cc/work
> > > > >
> space/newstore/src/store/static/images/users/cc/workspace/newstore/src/
> > > > > store/static/images/users/cc/workspac
> > > > > e/newstore/src/store/static/images/users/cc/workspace/newstore/src/
> > > > > store/static/images/users/cc/workspace/ne
> > > > >
> wstore/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/newsto
> > > > > re/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/newstore/s
> > > > >
> rc/store/static/images/users/cc/workspace/newstore/src/store/static/
> > > > > images/users/cc/workspace/newstore/src/s
> > > > >
> tore/static/images/users/cc/workspace/newstore/src/store/static/images/
> > > > > users/cc/workspace/newstore/src/store
> > > > > /static/images/users/cc/workspace/newstore/src/store/static/images/
> > > > > users/cc/workspace/newstore/src/store/sta
> > > > >
> tic/images/users/cc/workspace/newstore/src/store/static/images/users/
> > > > > cc/workspace/newstore/src/store/static/
> > > > >
> images/users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/imag
> > > > > es/users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/images/u
> > > > >
> sers/cc/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users
> > > > > /cc/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/mar
> > > > >
> uchan/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/
> > > > > n/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/cc/wo
> > > > >
> rkspace/newstore/src/store/static/images/users/cc/workspace/newstore/
> > > > > src/store/static/images/users/cc/worksp
> > > > >
> ace/newstore/src/store/static/images/users/cc/workspace/newstore/src/
> > > > > store/static/images/users/cc/workspace/
> > > > >
> newstore/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/news
> > > > > tore/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/newstore
> > > > >
> /src/store/static/images/users/cc/workspace/newstore/src/store/static/
> > > > > images/users/cc/workspace/newstore/src
> > > > > /store/static/images/users/cc/workspace/newstore/src/store/static/
> > > > > images/users/cc/workspace/newstore/src/sto
> > > > >
> re/static/images/users/cc/workspace/newstore/src/store/static/images/
> > > > > users/cc/workspace/newstore/src/store/s
> > > > >
> tatic/images/users/cc/workspace/newstore/src/store/static/images/users/
> > > > > cc/workspace/newstore/src/store/stati
> > > > >
> c/images/users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/im
> > > > > ages/users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/images
> > > > > /users/cc/workspace/newstore/src/store/static/images/users/cc/
> > > > > workspace/newstore/src/store/static/images/use
> > > > >
> rs/cc/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/m
> > > > > cc/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/cc
> > > > > cc/workspace/newstore/src/store/static/images/users/cc/workspace/
> > > > > newstore/src/store/static/images/users/cc/
> > > > >
> workspace/newstore/src/store/static/images/users/cc/workspace/newstore/
> > > > > src/store/static/images/users/cc/work
> > > > >
> space/newstore/src/store/static/images/users/cc/workspace/newstore/src/
> > > > > store/static/images/users/cc/workspac
> > > > > e/newstore/src/store/static/images/users/cc/workspace/newstore/src/
> > > > > store/static/images/users/cc/workspace/ne
> > > > >
> wstore/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/newsto
> > > > > re/src/store/static/images/users/cc/workspace/newstore/src/store/
> > > > > static/images/users/cc/workspace/newstore/s
> > > > > rc/store/static/images/productimage-picture-neat-
> > > > > book-2_jpg_280x280_q85.jpg HTTP/1.1" 302 0
> >
> > > > > On Nov 27, 8:39 pm, Chris Moffitt <[email protected]> wrote:
> >
> > > > > > It's probably some sort of issue with windows paths. You can hard
> code the
> > > > > > path in your settings.py here -
> > > > > > MEDIA_ROOT = os.path.join(DIRNAME,'static/')
> >
> > > > > > for some reason, the os.path.join isn't working right with
> windows.
> >
> > > > > > -Chris
> >
> > > > > > On Fri, Nov 27, 2009 at 5:03 PM, cc <[email protected]>
> wrote:
> > > > > > > I deployed the store using the store builder script and for
> some
> > > > > > > reason the thumbnail paths are /static/C:/path/to/my/site/.
>  Not sure
> > > > > > > why it would be appending the absolute path instead of the
> relative
> > > > > > > path.  Any idea what could cause this?
> >
> > > > > > > Using Django 1.1, satchmo tip (1.0-pre) and latest libs on
> Windows 7.
> >
> > > > > > > Thanks in advance.
> >
> > > > > > > --
> >
> > > > > > > You received this message because you are subscribed to the
> Google Groups
> > > > > > > "Satchmo users" group.
> > > > > > > To post to this group, send email to
> >
> > ...
> >
> > read more ยป
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Satchmo users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<satchmo-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/satchmo-users?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.


Reply via email to