Forums

Why url link repeating itself?

The Error I get is

FileNotFoundError at /login/

/home/app/app/home/app/app/media/profile-pics/pic.png
[Errno 2] No such file or directory: '/home/app/app/home/app/app/media/profile-pics/pic.png'

Yes, I have a username and folder of the same name. Just to clarify. My MEADIA_URL and MEDIA_ROOT are:

MEDIA_URL ='/media/'
MEDIA_ROOT=os.path.join(BASE_DIR, 'home/app/app/media')

I specified path in static files in WEB App Setup as:

/media/............................................/home/app/app/media

P.S if any staff are seeing this, you can look into the codes, errors and whatnot to pinpoint if necessary

BASE_DIR already contains /home/app/app and then you're appending home/app/app to it.

OH yes that's it. now it works. Thanks dude! I just changed the URL in WEB App Setup as /media And I got another problem now

why are the pics not loading? It is there. The pics are being specified to each profile but they are not showing

Sorry for the trouble haha

Here's an update if some of you stumble upon this forum I changed MEDIA_ROOT as:

MEDIA_ROOT=BASE_DIR.joinpath( '/media')

And in WEB App Setup I just did what I did previously

/media/............................................/home/app/app/media

It worked for me. Hope it helps you all.

Glad to hear that you made it all work!