Chayeb
yes
Try to delete database file
Chayeb
You have file database.db in your project derectory
Chayeb
Just click right and chose delete
Alexander
Hi guys. I am new in Django. Need your help. There is a one-to-many relationship. You must select all records that do not have records in the child table. On the fingers: there is a Parent model and a Child model: i wanna select all parents without children. A lot of thanks for your help in advance
Alexander
You need to use filter and exclude method
Thanks for your answer. How can i exclude by child_set count?
حمید
Error Manager isn't available; 'auth.User' has been swapped for 'user.Profile'
Chayeb
Thanks for your answer. How can i exclude by child_set count?
I don't really understand what you want to do but you can read about this in Django documentation search for making query
حمید
Add your costumuser to the settings.py file
AUTH_USER_MODEL = 'user.Profile'
Chayeb
User it's your app?
Chayeb
AUTH_USER_MODEL='yourapp.yourcostumuser'
Alexander
I don't really understand what you want to do but you can read about this in Django documentation search for making query
in raw sql: SELECT * FROM Parents p LEFT JOIN Children c ON p.pk = c.parent_pk WHERE c.pk IS NULL
Chayeb
in raw sql: SELECT * FROM Parents p LEFT JOIN Children c ON p.pk = c.parent_pk WHERE c.pk IS NULL
def parent_without_children_view(request): parents_without_children = Parent.objects.select_related('children').filter(childrenpkisnull=True) context = { 'parents_without_children': parents_without_children } return render(request, 'parent_without_children.html', context)
Chayeb
You mean this?
Kola
keypress tracking in django site. its realy ?
Kola
how to make tracking keys on the site.
Charly
Kola
Yeah
Charly
Why do you need that?
Kola
I work with the site and I was wondering how to do it on the site
Charly
I work with the site and I was wondering how to do it on the site
Yeah but why? Is not that intrusive? But whatever you need to do that with JavaScript
Kola
I can't find any info on this, I work with django and it makes it easy to validate anything.
Charly
I can't find any info on this, I work with django and it makes it easy to validate anything.
You don't need to register all keypresses to validate thing on Django
Kola
Yeah. I want to spays
Kola
when you finished registration , you just need to hit the space bar and it will work like ok
Alfredo
🤯
Charly
when you finished registration , you just need to hit the space bar and it will work like ok
That's unergonomic but whatever, that's done with JavaScript, and you don't need to register ALL keys just wait for the specific key to be pressed
حمید
When editing the user, I don't want the password1 and 2 to be visible What should I do
Kesav
Yes
Alexander
Yes
depending on what you are going to do
Kesav
Django is an python framework it's not an module
Kesav
There is an official document website for django just search
Alexander
I’m just using drf https://www.django-rest-framework.org only for API for frontend developers.
Muhammed emin
I need to constantly check the model's time field in Django, how can I do it?
Vasily
I need to click on reply button and move to comment form in the bottom of current Page, I made it via anchore, but I want to provide in my form information about replied comment(at Least pk and User). How can I do it if I don't have get/post until fill and send my form to view. Comment form always shows on the page.
Anonymous
Django
Domestos
Hey guys, I’m trying to create a web-shop and I need to have many images related to just one exact product. I tried with ManyToMany, but it’s hard to realise where is images, that I need, while adding them, can someone help pls?
Harleen kaur
Hello, why Django Channels is not suitable for real-time application? Does anyone have experience?
Django Channels is not designed to handle high levels of concurrency, which can limit its ability to handle large volumes of traffic or multiple connections simultaneously.
MR
Hii can any one help me for setting up the kubernetes in windows using Ubuntu instance on AWS????
Paul
I suggest this in barely Junior level questions, those who gave me them - tells that Middle level ones, who right? "What is the difference between Django's HttpResponse and JsonResponse classes? When would you use one over the other? What is Django's Object-Relational Mapping (ORM)? How does it work, and what are some advantages of using it? How do you use Django's built-in authentication system to handle user authentication and authorization? What is the difference between Django's STATIC_ROOT and STATICFILES_DIRS settings? How do you create a custom Django management command? What are some use cases for custom management commands?"
Nitin
Anyone suggest me how can I perform periodic task ?
#RSD
Hello. Is it true that Django has higher resource consumption than Laravel or Symfony?
uday Thakur
can anyone help i am getting this error:- " type error missing 1 required positional argument:id"
uday Thakur
stackoverflow
solution?
Anonymous
send the code
PR
I wanna use tether payment in my django project How i can?
PR
use documentation
For example: User comes to my site and buy a product with bitcoin
Jeet
https://github.com/mysteriousleo/chat_app
Jeet
plz someone can help the apps are not able to run
Karz
Hello Team, I am new to Django and i need to learn it for my project. Can anyone suggest me the best course to learn and work on
Omar
Hello Team, I am new to Django and i need to learn it for my project. Can anyone suggest me the best course to learn and work on
https://www.youtube.com/watch?v=UmljXZIypDc&list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p
‎ ‎Max
Hi everyone, can I group models in django admin ? like Personal , Blog and etc
daft
https://stackoverflow.com/questions/75499413/set-declined-to-true-if-approved-is-false
𝙰𝚜𝚑𝚠𝚒𝚗
Can anyone help me out with this
You have to update your model approved and declined doesn't make sense why have two fields when you can achieve same thing with only one remove those fields and add something like is_approved = models.BooleanField(default=False) And then make it True when it's approved
𝙰𝚜𝚑𝚠𝚒𝚗
How
Model_Name.objects.filter(is_approved=False)