#Django static wont work
23 messages · Page 1 of 1 (latest)
Project ID: N/A
N/A
It sounds like you may need to configure the STATICFILES_STORAGE setting and white noise configuration. Try following the instructions to see if that helps.
With an AWS S3 bucket static files worked fine on my Django app after COLLECTSTATIC with settings.py of:-
INSTALLED_APPS = [.... 'storages', .....]
AWS_STORAGE_BUCKET_NAME = 'your_bucket_name'
AWS_S3_REGION_NAME = 'your-region' # e.g. us-east-2
AWS_DEFAULT_ACL = None
AWS_S3_CUSTOM_DOMAIN = f'{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com' #Used by django-storages
STATICFILES_LOCATION = 'staticfiles'
STATICFILES_STORAGE = 'custom_storages.StaticStorage' # For AWS Static Storage
MEDIAFILES_LOCATION = 'media'
DEFAULT_FILE_STORAGE = 'custom_storages.MediaStorage' # and Not MEDIAFILES_STORAGE as you might expect
Sounds like you are more familiar with whitenoise than I but if you would like a doublecheck I believe the comparable settings would be:-'
MIDDLEWARE = [ ....'whitenoise.middleware.WhiteNoiseMiddleware', ....]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
I figured it out
but i had a nother question
Do you know if I am able to run a discord bot alongside django
info if it matters
Disnake (discord package)
Latest Django
Waitress Command to run: "web: waitress-serve --listen=*:5000 incognito.wsgi:application"
alongside as in in the same service? Not sure about that. But you can create a new servicee in the same project
yes but how
i created a command
for it
like py manage.py RunBot and htat works but idk how to run them both at once
Create a new service in your project and add the Github repo for your bot there
Dashboard --> Project --> New (Top right) --> Github repo
how did u sort it out? i am currently facing the same problem
What is the actual problem?
My guess is you're not certain how to create another service that runs a different command than runserver? But without more info it's hard to help.
never sorted it out
switched to react.js
but
you honestly should just get the website hosted on railway or something else and run the bot locally