DuGites / django-profile

Automatically exported from code.google.com/p/django-profile
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Can not load an image on windows #71

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running the demo on a windows XP environment
2. Create a profile
3. Whatever page that contains an avatar wont´t show the image

What is the expected output? What do you see instead?
An image with the avatar should be shown, but and empty squarte is shown.
Not even the default avatar is shown in the browser.

What version of the product are you using? On what operating system?

Version 0.6. Windows XP.

Please provide any additional information below.

The problem is caused because the url given for an avatar takes the form
like: site_media/avatars/2009/Oct/22\ricardo.96.jpg. Watch that the
trailing backslash. The url is build in userprofile/templatetags/avatars.py
in the line: url = os.path.join(base, "%s.%s%s" % (name, self.size,
extension)).
when trying to access to that url, the interpreter is transforming it to:

...../avatars/2009/Oct/avatars/2009/Oct/ricardin.96.jpg

instead of 

......\avatars\2009\oct\22\ricardo.96.jpg

It might be due to the urls.py or something like that.

Greetings

Ricardo Vega Dosal.

Original issue reported on code.google.com by arvdo...@gmail.com on 22 Oct 2009 at 4:28