in settings.py:
MEDIA_ROOT = 'd:/djangopro/mysite/media/'

in views.py:
from django.conf import settings

src = MEDIA_ROOT + 'user/defalut.jpg'

but i got this error:
equest Method:          POST
Request URL:    http://127.0.0.1/accounts/register/
Exception Type:         NameError
Exception Value:        global name 'MEDIA_ROOT' is not defined
Exception Location:     d:\djangopro\mysite\myuser\views.py in
create_user_profile, line 19
Python Executable:      C:\Apache2\bin\Apache.exe
Python Version:         2.5.1

can someone help me, thx!


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to