Forums

Blog form.html not submitting my content after deploying to pythonanywhere server

i created blogform.html file where i uploaded some content and published to another page, it was working on my local server in pycharm but when i uploaded here it here after clicking publish it starts loading and shows an error access denied, {i have used media root to store images in my static directory}

"It shows "

PermissionError at /blog [Errno 13] Permission denied: '/app name'

Looks like your django settings were not pointing to the right path: Look at https://help.pythonanywhere.com/pages/DjangoStaticFiles and also more general https://help.pythonanywhere.com/pages/DebuggingStaticFiles

this is how i have set static files all static files are working fine but what i think here is the media root is not getting access when i enter field in blog form and add an image after clicking submit it shows an error of permission access at /Appname

STATIC_URL = '/static/'
STATICFILES_DIRS = [
 "/Project Name/App Name/static/Files/"
 "/Project Name/App Name/static/Files/"
 "/Project Name/App Name/static/Files/"
 "/Project Name/App Name/static/Files/"
 "/Project Name/App Name/static/Files/"
 "/Project Name/App Name/static/Files/"
 "/Project Name/App Name/static/Files/"
]

MEDIA_ROOT='/Project Name/App Name/static/media'
MEDIA_URL='/media/'

[edit by admin: formatting]

The MEDIA_ROOT should be the full path to the directory containing your media files, which start with /home/Thedailyvines/.

Hi, thank you , for your help it works now