clouded
Try to understand what you do there.
Rawat_OG
I have one question that when I'm turning off debug in settings my images won't load anymore
Rawat_OG
Nana
Please is django a right choice to build a full flex school webapp with Lil social features?
Nana
Charly
Charly
Nana
Nana
Vs
How to connect API (DRF)IN HTML CSS frontend
Nana
Nana
Parag
Access to fetch at 'http://localhost:5050/upload_post' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response.Understand this error
UploadPost.jsx:37
POST http://localhost:5050/upload_post net::ERR_FAILED
Parag
please help with this error
The Inspired
you have to install cors in django
The Inspired
https://www.geeksforgeeks.org/how-to-enable-cors-headers-in-your-django-project/
Parag
Parag
Failed to load resource: the server responded with a status of 409 (CONFLICT)
The Inspired
then it's a frontend error, I think
The Inspired
might need to see the code to say anything
Nana
hello, please can i used django as a backend for mobile app created with reactNative?
Charly
Nana
Yes
God bless you brother
S
Hello, anyone here can help me for our django activity? First time using django and I really dont know how i am 2nd yr IT student
Parag
Why u guys just liking the error ,I want solution 🙂🥲
Ahmad
Pablo
🏅♐Mark
hamid
Hey guys
I have a status field for a model
for example I want if the status don't change from unpaid to paid after 5 min after creation of it the status change to failed
how can I deploy this?
Dev
Eric
Dev
If you’re concerned about performance, get a dedicated table, clear the record after its served its purpose and update the main table
Capi
indexing should be enough.
Rohan
Rohan
You run a cleanup job that removes the entries from table that are executed. Not to mention you do indexing on the table.
Rohan
Celery can be more of a bottleneck in a distributed system than this scheduler design.
It’s
i face a problem , can not show static file in deply product
any one please help me.
It’s
STATIC_URL = 'static/'
# Development mode e eta lagbe
STATICFILES_DIRS = [BASE_DIR / "static"]
# Production mode e:
STATIC_ROOT = '/home/pkgitbdc/operations.pkgitbd.com/static'
MEDIA_ROOT = '/home/pkgitbdc/operations.pkgitbd.com/media'
MEDIA_URL = '/media/'
It’s
okey?
WenDao
WenDao
There is only one fragment that cannot help solve the problem.
It’s
my local project work, static file no issue , but when i deply it in Cpanel. then my static file can not show
WenDao
check that is it deployed right
It’s
i host on subdomain
It’s
can i share link?
It’s
for just see
WenDao
my site is on subdomain too
It’s
https://diucpc.pkgitbd.com/accounts/login/?next=/
HAJI MASTAN
It’s
yes, already do this. but my.hta. ess file maybe create problem
Charly
It’s
in subdomain
.htacess file maybe not create
WenDao
~~~
Hi all
I am having issue with cloudinary image uploading. I configured everything as per the documentation...but still image is saving into local folder.
The api keys are working and the custom cloudinary field is also working.But with default Imagefield it is not working
Does anyone know the issue?
pink
Default ImageField isn’t uploading to Cloudinary.
pink
Instead of Django’s default ImageField, you can use CloudinaryField from cloudinary model
pink
you must set DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage'
in the settings.py
WenDao
pink
If you’re manually saving the file with something like image_file.save(path), that would bypass the configured storage
WenDao
just set DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage' first
~~~
Okay, let me check that..Thank you for the help👍
~~~
~~~
But still it is bypassing it
WenDao
INSTALLED_APPS = [
...
'cloudinary_storage', # must before staticfiles
'django.contrib.staticfiles',
'cloudinary',
...
]
~~~
pink
If you load secrets from .env or environment variables, make sure they’re actually being read. Otherwise, Django may silently fall back to the default filesystem.
pink
can you print this : print(default_storage.__class__)
~~~
pink
you have multiple settings file?
pink
setting.prod, local v v
pink
ensure your DEFAULT_FILE_STORAGE is set corectly