Anonymous
It's good I too don't understand more about it
I did not find any complete and good source in either English or Persian (national language) and I was confused
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😐
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.
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
This is bookmarks logo
Charanjit Singh
When you save a bookmark this favicon is displayed
Anonymous
Because most of the browser fetch for this
okay, thx where should I place this icon file?
Charanjit Singh
If you want you can ignore this
Anonymous
âshîsh
[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?
That's your browser tab logo. You have to define it within header inside html. That's generally .ico file. You can convert your logo PNG into ICO file online (just renaming extension won't work). Then include that ICO file inside your header.
hello
Can anyone tell me best resource or best way to learn django,i am confident in python confident in psql.
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
Anonymous
Create new superuser
âshîsh
Help
Create new one- python manage.py createsuperuser
AGASTRONICS
Create new superuser
🙏 Thanks, brothers in Tech
â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
Hello Please I want to add a slider to show my youtube video to my website on Django it is possible
It's not related to Django You can do it just with your html and js
Anonymous
without CSS ??
Mirco
without CSS ??
Yup sure but without Django basically 😂 It's a frontend stuff, not related to Django
Tukhtamurod
Hello Please I want to add a slider to show my youtube video to my website on Django it is possible
sorry man😅,but i dont understand one thing, you should have general knowledge of what django is, not only django any back-end programming language, and that there is no relationship beetween django and slider😃
Dennoh
Anyone pls check for this https://stackoverflow.com/questions/66088547/multiple-django-dinja-template
first of all there is no fieldset in the context and that means your for loop won't be executed.
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
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?
Too long to say here, u can find references online If u r free to choose, I'd suggest u Postgres to use 100% Django power
Hikmet
Too long to say here, u can find references online If u r free to choose, I'd suggest u Postgres to use 100% Django power
Before asking I always make some research from google. But one says mysql, other says postgresql, and I made a conclusion that it depends on what type of backend is used for website. For example my type of website is car sales, where there are only car and dealer. Have to make decision)
Doragonsureiyā
Okay, thank you buddy🙂
You're welcome! 😊
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.
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
Renal Eki
Anyone can help me ? How to delete file media when deleting object using DeleteView ?
Anonymous
Which html grammars are supported?
Haleem
first of all there is no fieldset in the context and that means your for loop won't be executed.
Its just a name called fieldset, i am just gettings the names of the fields. And using it to context from the view file like form.fieldsetname. This way we can print the fieldset in the similar fashion as admin panel.
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?
Right now i do it this way: https://del.dog/manilingux.txt but than the first user that requests this (every 2h) needs to wait some seconds till the api responds. also i need to reference objects from this external api in the local database (the external api gives data about courses and i wan't to save locally which company can access which course, so there needs to be some kind of reference). just saving every new course into a database leads to the problem, that deleted courses woudn't be detected. any idea on how to implement it correctly? i think about something like a thread that consumes the external api and saves that data in the local database, but that sounds complicated and there is probably a better way.
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
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
explain better
Gkm
thank you very much I found the solution 🙏🙏🙏
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
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
Ok understood, thanks, Can you tell me if it is a good way to use Django-tz-detect to convert datetime to user's timezone?