Adnan
Sopan
I did that before
May be - your Django is usig different Python/Environment than where you installed Pillow.
Simple way to check this is: "python manage.py shell"
import Pillow
If this throws an error then it's Pillow installation issue
else - somehthing wrong inside your django code where you are importing Pillow
ARBAAB
maybe my question is flying over you guys head thats why no one is able to answer😐
Sopan
Anonymous
His Question is:
How to pass multiple inputs to database by submitting once and all the rows must be submitted rather than adding one by one.
ARBAAB
Sur'at
Hi Guys
I have problem with captcha i installed django-simple-captcha package
But this error ModuleNotFoundError: No module named 'captcha'
Anonymous
[07/Feb/2021 18:16:13] "GET /statics/favicon.ico HTTP/1.1" 404 2102
why do I get this log for every page that I'm entering?
Charanjit Singh
Charanjit Singh
This is bookmarks logo
Charanjit Singh
When you save a bookmark this favicon is displayed
Charanjit Singh
If you want you can ignore this
Anonymous
Anonymous
hello
Can anyone tell me best resource or best way to learn django,i am confident in python confident in psql.
Anonymous
hello
Haleem
Anyone pls check for this
https://stackoverflow.com/questions/66088547/multiple-django-dinja-template
Haleem
For jinja code
ARBAAB
how?
AGASTRONICS
Am unable to login my django admin panel
AGASTRONICS
Anonymous
Create new superuser
âshîsh
Help
Create new one-
python manage.py createsuperuser
AGASTRONICS
âshîsh
Namaste 🇮🇳
😊😊
âshîsh
Роберт
Has anyone done two different documentation with drf-yasg
I want to output some queries separately so they don't overlap with the general api
In general, get_schema_view allows to make two different addresses per doc, but the swagger generation is the same
Anonymous
Hello Please I want to add a slider to show my youtube video to my website on Django it is possible
Mirco
Anonymous
without CSS ??
Mirco
without CSS ??
Yup sure but without Django basically 😂
It's a frontend stuff, not related to Django
Dennoh
Anyone pls check for this
https://stackoverflow.com/questions/66088547/multiple-django-dinja-template
To answer you, this is how you loop through the form fields
{% for field in form %}
<div class="fieldWrapper">
{{ field.errors }}
{{ field.label_tag }} {{ field }}
{% if field.help_text %}
<p class="help">{{ field.help_text|safe }}</p>
{% endif %}
</div>
{% endfor %}
Link to django docs: https://docs.djangoproject.com/en/3.1/topics/forms/#looping-over-the-form-s-fields
Akash
When using Token authentication, Why we don't need CSRF protection ?
Arbeit
i am using django rest framework and i need to integrate an external api with a client.
to get the data from the external api i use this methods:
client = LodsApiClient(api_key, api_url)
client.catalog()
how can i integrate this into my app, preferably via a viewset?
Hikmet
Hello there. Can anyone tell me, is there any difference between using mysql or postgresql? What are the benefits and disadvantages of both in django?
Mirco
Mirco
Hikmet
kunmi_od
👋hi I'm a Django amateur......i use to Code with Django without a virtual env, my projects got messed up.....so I started using Virtual env but after activating the VENV , when I use the "python manage.py runserver" nothing happens, the CMD just goes to the next line......... Someone help me please
Shubham
can anyone tell me how this save() orks?
Anonymous
Good Noie, Guys every time I access my site it happens in the server log and although my site works normally it ends up bothering me. Does anyone know how to solve?
Exception happened d
during processing of request from ('127.0.0.1', 41507)
connectionResetError: [Errno 104] Connection reset by peer.
M.T.saeedi
Arbeit
When using Token authentication, Why we don't need CSRF protection ?
I'll try to explain csrf with an example:
normal authentication works like this: when you log in, a cookie is saved and every time you visit the site, this cookie is transferred to the site in a header. alternatively with basic auth, no cookie is transferred, but your login data is transferred, also via headers that are automatically set when you visit the site.
let's say you are a youtuber and have a video with few likes. a csrf attack would then look like you copy the link to upvote your video and post it in the comments of other videos or on other websites. if someone else who is already logged in on youtube clicks on that link, their cookie will be transferred and the request is automatically authenticated and so you would get a like on that video.
csrf is there to prevent this. a csrf token is generated when you visit the page and has to be transferred together with the cookie to authenticate you successfully. if you click on the link, the token is missing and you will not be authenticated and the video will not be liked.
with token authentication you have to set the token header manually, the browser doesn't do that automatically, unlike cookie and basic authentication. if you post the link now and someone clicks on it, then the person is not authenticated because the token is not transferred automatically. that's why no csrf attack works here and that's why you don't need a csrf token here.
Arbeit
you can read more about it here: https://security.stackexchange.com/questions/170388/do-i-need-csrf-token-if-im-using-bearer-jwt
Artyom
Hello everyone, is there anyone who is good at django orm? need a little help
Artyom
My model:
class Member(models.Model):
customer = models.CharField(max_length=50) item=ArrayField(models.CharField(max_lenght=50))
total = models.IntegerField()
Need to make a request so that it displays the top 5 users by total (I understand how to do this), but for each of the 5 customers, need to display only those items that are found in at least two other customers of this top 5
Anonymous
Renal Eki
Anyone can help me ? How to delete file media when deleting object using DeleteView ?
Anonymous
Which html grammars are supported?
Nani
José Antonio
Hi, does someone have a Django project in app engine?
I recently changed some models in dev
And make the makemigrations and migrate thing and everything works fine
Then I use the command gcloud app deploy but I get error in productions because the server didn't 'migrate' this new changes and isn't supposed to migrate automatically?
José Antonio
Or should I get into the instance and run the
python manage.py migrate
thing?
José Antonio
I solved it, I entered the instance VM and then the docker container so I could run the python manage.py migrate
And everything works nice
I think that that its not supposed to be done
Akash
When defining CORS_ORIGIN_WHITELIST for a DEV enviroment, How can we mention FE server PORT without hardcoding it ?
CORS_ORIGIN_WHITELIST = [
"myapp.com"
]
if env.DEV_ENV:
CORS_ORIGIN_WHITELIST += ['localhost:4200', "127.0.0.1:4200"]
Anonymous
hello eyeryone
Mirco
Doragonsureiyā
hello eyeryone
Please move your "Hello" and other social talk to @PythonOfftopic.
Alikhanov Jakhongir
hi everyone!
possible to convert datetime to local timezone date in Django Template?
settings.py
TIME_ZONE = "UTC"
USE_I18N = True
USE_L10N = True
USE_TZ = True
Mirco
Mirco
explain better
Gkm
Gkm
Gkm
thank you very much I found the solution 🙏🙏🙏
Mirco
Gkm
Artyom
Guys, who can help me with Django orm? Pls
My model:
class Member(models.Model):
customer = models.CharField(max_length=50) item=ArrayField(models.CharField(max_lenght=50))
total = models.IntegerField()
Need to make a request so that it displays the top 5 users by total (I understand how to do this), but for each of the 5 customers, need to display only those items that are found in at least two other customers of this top 5
Anonymous
how can I pass foreign key id in post request?
Alikhanov Jakhongir
Anonymous