Anonymous
hello folks, why corsheaders only work if a set CORS_ORIGIN_ALLOW_ALL = True, never work for me the CORS_ORIGIN_WHITELIST
Andrej
Anonymous
the response is which that header Access-Control-Allow-Origin doesn't exists
Anonymous
if i set allow_all = true, all perfect, but... that's isn't the goal
Shiven
Anonymous
Shiven
Thx guys for the help really appreciate it
Anonymous
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
Andrej
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
Try this and let me know:
MIDDLEWARE_CLASSES = [
...
'corsheaders.middleware.CorsMiddleware',
...
'django.middleware.csrf.CsrfViewMiddleware',
'corsheaders.middleware.CorsPostCsrfMiddleware',
...
]
Andrej
https://pypi.org/project/django-cors-headers/
Anonymous
nothing 😕
Bhavesh
I am a beginner and I want Multiple arguments with values to custom management command, I am using following code
Andrej
nothing 😕
https://pastebin.com/CZbmfRcx
Bhavesh
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = ''
def handle(self, *args, **options):
pass
def add_arguments(self, parser):
parser.add_argument('--str_arg1', nargs='+')
parser.add_argument('--int_arg2', nargs='+', type=int)
Bhavesh
when I run
manage.py mycommand
but I am getting an error
F:\tb\sun>manage.py mycommand
Unknown command: 'mycommand'
Type 'manage.py help' for usage.
Bhavesh
My path is
management/
commands/
init.py
mycommand.py
init.py
Bhavesh
Anyone know about it?
Andrej
Bhavesh
Yeas added
Andrej
nothing 😕
Read the instructions again. Maybe you will find some special case in your configuration which you have to consider
https://pypi.org/project/django-cors-headers/
Anonymous
i has readed it a lot of times, is very easy to setup, but, no work for me 😐
Anonymous
Andrej
Yeas added
Do you see your command after:
python manage.py
Andrej
Anonymous
gunicorn + nginx
Bhavesh
Presence
Hello guys I'm using dj-rest-auth I've created api with it for login. When I try to login with my front end it gives error 400
Andrej
init . py
Andrej
with underscores
Andrej
_ _ init _ _ . py
Bhavesh
It's with __ there
Bhavesh
By mistake I wrote wrong here
Andrej
ok
Vanthoff_111
Is there any competitive coder who can solve medium level difficulty problems? It's important please message me personally.!
Anonymous
Is anyone interested to practice django rest framework API in team viewer? Msg me personally
Anonymous
Image is not work in ios system
Amit
Hi guys while using keras in my django project, I am facing a problem to importing my h5 files it's showing me bad Marshall error. I am using windows any links or video will be helpful and appreciated!!
Amit
bad marshal data*
Дауран
Hello guys i am a beginner on Django especially I started a couple days ago
Anton
Hi, everybody. Please tell me how to create a folder automatically when uploading a file? I wrote the path in the model, but I don't know how to determine which folder to put the user in(
Nirmal
Helloo guys
George
What language is this?
maroong
Lol
George
WTF
Anton
)))
maroong
Sksksksks jajaja
Jai
⟨ Simon |
It's HINDI
What do the rules say about non-english languages ?
maroong
Nirmal
Ok
Дауран
Дауран
Keep English guys
Nirmal
Okey
George
lmao
Nirmal
For the college project in django
Anton
Help plz
Дауран
Because here are many people know English language
George
!rules
Doragonsureiyā
Read the rules before any activity: @PythonRules
Nirmal
Plzz tell me the some good topics ideas for the project
maroong
George
Mihir
VarunTheLord
The bot is active
Nirmal
Ok
Nirmal
Any other idea??
Nirmal
Bcaz i m a beginner
Nirmal
So... I don't have an idea
Nirmal
Which type of project is for beginners?
Nirmal
In jang9
Nirmal
Jango*
VarunTheLord
Just make blog site
VarunTheLord
Or a todo app.