Mario, thank you very much! You just made my day. Regards, Lloyd
On Fri, Nov 5, 2010 at 1:23 PM, Mário Neto <macndes...@gmail.com> wrote: > instead this: > MEDIA_URL = os.path.realpath(PROJECT_PATH + '/media/') > try: > MEDIA_URL = '/media/' > > 2010/11/5 Sithembewena Lloyd Dube <zebr...@gmail.com> > >> Update: I added AVATAR_STORAGE_DIR = MEDIA_ROOT to my settings.py file. >> >> When I load the page, the avatar's src is >> "C:/Websites/TPFRepository/projectname/media/username/image.jpg" - which is >> correct. if i paste that into Windows Explorer, I do find the image. >> >> Still, it is not displayed on the page. What am I missing? Any help would >> be appreciated. >> >> Thanks, >> Sithu. >> >> >> On Fri, Nov 5, 2010 at 10:58 AM, Sithembewena Lloyd Dube < >> zebr...@gmail.com> wrote: >> >>> Hi all, >>> >>> I installed the django-avatar app in my project and, in a template, i >>> have the {% load avatar_tags %} and {% avatar user 65 %} template tags. When >>> I load the page and view source, the avatar's alt tag is correct but the >>> image src is wrong. It appears relative to the template's directory instead >>> of pointing to the project's media directory. Naturally, it is not found >>> there and does not display. >>> >>> In settings.py, I have: >>> >>> import os >>> PROJECT_PATH = os.path.realpath(os.path.dirname(__file__)) >>> MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media') >>> MEDIA_URL = os.path.realpath(PROJECT_PATH + '/media/') >>> >>> What can I do to have the image src pointing to the correct avatar >>> directory (C:\Websites\ProjectRepository\projectname\media)? >>> >>> Thanks... >>> >>> -- >>> Regards, >>> Sithembewena Lloyd Dube >>> http://www.lloyddube.com >>> >> >> >> >> -- >> Regards, >> Sithembewena Lloyd Dube >> http://www.lloyddube.com >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > > -- > Att. Mário A. Chaves Neto > Designer / U.I. Engineer > MBA - Design Digital > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Regards, Sithembewena Lloyd Dube http://www.lloyddube.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.