Forums

A strange problem

Hi,

I've encountered a strange problem: I've copy my whole settings.py content to one of my student's settings.py and change my username to his username. (username: zhaohongzhen20160254)

I've set this in the settings.py:

STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR,'static'),]

And there is a sub-directory named "font-image" under directory "static". there is a image file named "01.jpg" under directory "font-image".

When I visited my website use: http://adrop.pythonanywhere.com/static/font-image/01.jpg The image shows up. But if I visited my student's website use: http://zhaohongzhen20160245.pythonanywhere.com/staitc/font-image/01.jpg, it keep shows the error message says that the url is not correct.

Finally, I create a new folder in his static folder, named "fontimage", without the "-", and also upload "01.jpg" in it and visit via http://zhaohongzhen20160245.pythonanywhere.com/staitc/fontimage/01.jpg everything works.

I'm wondering why this happened. Could you help me?

does he also have the static file mappings setup in his webapp config? (ie. did he go to his webapps tab on PythonAnywhere and setup a webapp, and setup the static file mappings there?)

Hi, Thank you for your help.

But I finally find out, that he put a space before the folder name, which is very difficult to discover.

And he created the folder via your interface. So could you please consider to delete the spaces when you received the folder name?

Thank you again for your wonderful and helpful website.

ah- that's definitely a tricky one! will add that to our features tracker