aamalig / django-profile

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

load page very very very slow, and upload avatar failled #66

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Userprofile work very well in demo, however it's doesn't work with my project.

I not sure it's a bug.

Original issue reported on code.google.com by shuge....@gmail.com on 28 Aug 2009 at 3:53

Attachments:

GoogleCodeExporter commented 8 years ago
ogv will show my problem
please take a look, thanks.

Original comment by shuge....@gmail.com on 28 Aug 2009 at 3:55

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, I have solved an issue on the code, could you make a checkout of the trunk 
and
try again?

One question, the image you are trying to upload is small of 2MB in size? 
There's a
quota established on settings.py limiting the image size to 2MB max.

Original comment by david.ru...@gmail.com on 28 Aug 2009 at 2:04

GoogleCodeExporter commented 8 years ago
I'm sure my upload image is smaller than 2MB.

I had fixed the problem about load page slowly, it's slow because of some 
STATIC file 
path has error.

Now I try to fix another problem about upload image file, I will send you 
message with 
my result.

Original comment by shuge....@gmail.com on 28 Aug 2009 at 3:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
# in settings.py
# A 
IP = 'http://127.0.0.1:8000'
MEDIA_URL = 'http://' + IP + '/static/'

# B
MEDIA_URL = '/static/'

if use A,
other models which contains FileField of my project app works well,
but it doesn't works well with userprofile,
such as
http://127.0.0.1:8000/accounts/profile/edit/avatar/crop/

I'm notice its source code:
    <fieldset> 
        <legend style='display:none'>Crop & resize the area you 
want</legend>
        <div style="text-align: center;"> 
            <img 
src="http://http://127.0.0.1:8000/static/avatar/s/lee_.jpg id="cropimage" /> 
        </div> 
        <input type="hidden" name="top" value="0"/> 
        <input type="hidden" name="bottom" value="0"/> 
        <input type="hidden" name="left" value="0"/> 
        <input type="hidden" name="right" value="0"/> 
    </fieldset> 

this is key:
"http://http://127.0.0.1:8000/static/avatar/s/lee_.jpg

I have not idea that how to fix it, please give me a hand, thank you so much.

Original comment by shuge....@gmail.com on 29 Aug 2009 at 2:53

Attachments: