Mirco
Anonymous
Django security releases issued: 2.2.3, 2.1.10 and 1.11.22
Mounikesh
https://stackoverflow.com/questions/56832291/how-to-get-the-user-from-a-manytomanyfield-in-django-using-djago-singals-and-cre?noredirect=1#comment100216794_56832291
Mounikesh
does anyone have any idea on how to do that
OUHBOY
Hi guys my py manage.py startapp it’s not working on pycharm and python is already configured well
OUHBOY
What could be the problem 🤔
The man
Anonymous
Hi guys my py manage.py startapp it’s not working on pycharm and python is already configured well
what os you use? maybe you are making mistake to run python file with right python version in ubuntu python and python3 differs if not can you send the error?
Misael
For example queryset result is {{value: 2}, {value: 5}, {value:8}}. I wish get 2, 5, 8 like a separately value
Hi @tyomick_mnemonic . Pass the parameter "flat=True" in values_list method. The result will be only the ids, as you wish. Ex: Article.objects.values_list('id', flat=True)
Sai
Python intersection is not work with queryset ny solution
cj
Maqbool wanted to post this long code: https://hastebin.com/xezavabeli
cj
@maqboolthoufeeq next time do it yourself
Anonymous
react or angular or vue js is simple with django
Anonymous
which one is more good with django
Maqbool
ok, thank you
cj
which one is more good with django
any of them, they are front-end libraries, they don't care if you use Django or whatever... the same, Django doesn't care what front-end library you're using
Maqbool
please help me with solution
#
I wanna to follow certification only course in this summer. Could u tell me where I can get free certification course?. But not only certification course, my plan to master Python with 6 Months. So I wanna to get recommendations from all of u how I can get success it. So please tell me from ur experience ➡️@erma43
Ajmal
please help me with solution
Look like you forget mention the app name while pointing to static files try firstapp/css/files Also don't forget to save the files in static/appname/css/files. Usually I follow these practices while playing with static files..
cj
Tnx, how can get in touch with Python programming?
reading the official documentation
iNcAeLuM
hi, I have an script that returns me a dict. so I am creating objects in my ddbb gettting the value for the key in the dict. Like this: obj.(field) = my_dict[key] it works fine, the problem is, sometimes that key in te original dict is missing, and i get a keynotfound error. so in order to solve it y have to deal with exceptions on every field i want to add. is there any better way to do this??
Misael
In the example, I've defined None, but you can choose any default value in cases of the key not exists in the dict.
entropy
Hi guys, what are the advantages of having multiple database in a django project? Does it affect the performance?
entropy
TIA
Orack
why would it slow
entropy
why would it slow
I mean, will it make the project faster? Esp. when the databases are from different servers
Orack
separating databases makes it more organized
iNcAeLuM
Hi Agustin, can you show us the error?
hi is just a common error when u are trying to find a key in a dict and that key doesnt exist
iNcAeLuM
keynotfound
Mirco
this works xperfect thanks a lot!
remember not to use always .get() when retrieve value from key if you don't know which default value you wanna put into your dict
Anonymous
Anyone knows about wq?
Kuroi
Hi guys. Can you help me with csrf? I'm getting a 403 with a "CSRF token missing or incorrect" error message after submitting a form. I've got 'CsrfViewMiddleware' enabled by default in settings.py, I've also got a csrf_token in the form template. As I'm newbie in django, I wonder what am I doing wrong... Any help or pointing the way?
Anonymous
Put {% csrf_token %} inside the form tag in your template
Kuroi
Yep, it's there already :-(
Anonymous
Send the template..
Kuroi
Send the template..
Here it is https://pastebin.com/MdmpQNCK
Kuroi
Try clearing your browser cache
Nope, that didn't help
Anonymous
Endblock content
Anonymous
Or cintent😅
Anonymous
Was that a typo?
Kuroi
No, still that 403
Kuroi
Ok, could it be in views function?.. should i put in the function return something special?
Anonymous
just a context with form=form
Anonymous
You are not making forms with Django built-in library
Anonymous
I use Django forms..and they work fine for me
Kuroi
The forms.py one? No, just straight in templates.
Anonymous
Try removing the method in form
Kuroi
Btw, I don't think, using Django forms will help... The built-in admin login form returns same error.
Anonymous
Built-in admin form🤔
Anonymous
How can it return the error
Kuroi
Well, it returns :-))) In my despair i think that the installation may be broken..
Maxim Cheremisov
Hey guys
Maxim Cheremisov
In which cases we need to make migrations? As i noticed, i changed a lot of parameters in Admin, Models e.t.c and i hadn't any problems with it withoun any migrations
Maxim Cheremisov
but in what situations i need to migrate?
Anonymous
but in what situations i need to migrate?
When you change something in model
Maxim Cheremisov
When you change something in model
only in the case of model?
Anonymous
Ys
Anonymous
Even if you change the model varaible names..you need to migrate it to save changes in database
Mirco
only in the case of model?
migrations are related to models
Maxim Cheremisov
thank you guys!
Welis
Hello everyone, help me please ), how i can use "%" in if tag in django template example: {% if forloop.counter % 2 == 0 %} ... {% endif %} —— I get exceptions Could not parse the remainder: '%' from '%'
Welis
Thanks