Денис
If in model A you have relation like this - b=models.ForeignKey(B)
Then u can filter objects like
A.objects.filter(b__modelBfield = )
Davide
yes i have a fk between A and B, and between B and C
Davide
but how to filter model A with a field from C ?
Денис
Try b__c__field
Davide
ok, after some test, the correct way is b__field-b-c__field-c
Davide
Thanks a lot
Suliman
Hello guys
can anyone here suggest me an open source project that can i start with to make a full e-commerce project
i want to use django to make APIs not to make a full stack project
Suliman
if anyone can help me to do that without starting from the begging in the project and remaking the wheel
i will appreciate his help a lot
Obdif
Hello guys, I’m a beginner in django and I’m currently building a web application but I need someone to help me with session in the web app, is difficult for me to use the session, please someone should help me out
Obdif
Noufal
Hi anybody know about the meta trading websocket api integration??
Mirco
Doragonsureiyā
Hi anybody know about the meta trading websocket api integration??
Don't ask meta questions like:
- Any user of $x here?
- Anyone used technology $y?
- Hello, I need help on $z!
Just ask directly!
The better you are at explaining the problem, the more likely you are to get help. If you don't know what that means, read Asking Smart Questions.
Lalə
Hello. It will be off topic, but I want to get an idea. I need to find an innovative idea in the field of education. An idea comes to my mind, but I don't know how innovative it is.
Students are matched with mentors that match their interests. These mentors guide students with their knowledge and answer their questions
For example, if a student indicates that they are having difficulty with math, the platform can refer them to a mentor who is a math expert. This mentor can provide the student with interactive materials to understand the concepts, answer their questions, and support them to increase their academic success.
How innovative is this idea?
DeathLikeSilence
Hello,
I customize my user in Django for registering and logging in.
In setting.py
I wrote it to add that.
AUTH_USER_MODEL =’ accounts. User’
Now I have added another model and I want to add it.
What should I do???
Can I add my new model to AUTH_USER_MODEL
Arsenii
deficiente ✙
DeathLikeSilence
I have to do it.
beacuse it is two diffrent user in my website
I mean, one of them is User or Client
another is seller
what should I do ????
deficiente ✙
deficiente ✙
Arsenii
deficiente ✙
DeathLikeSilence
DeathLikeSilence
DeathLikeSilence
Arseny
Hi all. Guys, please tell me how to send an array from js to the models field
Piyush
Hey ,I want help form you all,I have created an app where user enter his credentials like name,dob etc and an password will be generated,the module where this password will be generated is in google cloud platform how can I call it ,sorry if it is not related but I want some guidance.
Muflone
Arseny
Well, thanks
DeathLikeSilence
make models Clients and Sellers with field user related to User model
Excuse me, sir
Do you know how can I add another model to the admin panel
Before, I added the user to the admin panel like this:
admin. site.register(User, seller, UserAdmin)
User and seller are my models in model.py and UserAdmin is a class that I created in admin.py
But I have an error and I don't know what should I do
Muflone
deficiente ✙
try deleting User from the line
Believe
Believe
DeathLikeSilence
Muflone
Believe
Mohammed
Do you know how to customize the django admin to create a news web application?
Or do you know some django templates for that ?
Mirco
MaxFee
Hey guys, please help!
I have two models, A and B. I need to make it so that when a new user is created in database A, a table for that user is automatically created in database B! I can't figure out how to simultaneously create models. I'm using Django + Django Rest Framework.
Doragonsureiyā
Krushna
Anurag K
Can anybody explain about session and cookies, also about session managment
Software
Hello guys I one problem facing when userauths app create
Runtime error show
Software
Please soltuions tell me anyone
Doragonsureiyā
👑 Dharmzeey
Software
Yes wait
Caue
hi
Caue
do you guys have any exp about serving django apps with heroku?
Caue
especially what do i need to pay for these functionalities
Professor
Rishabh
Hi Guys, I want to know How do i hide my admin panel from users if i have to add domain name for SSL
Alex
Nima
Hello friends I want to add a section to my project so that the admin can upload an article through the admin panel, which is in Farsi and has photos and videos inside, and I want to handle it from the back end, what tools do you think other than ckeditor or tinymce is there another Or is it better for Front to fix it?
Dima
Hi, why filter not work ?
ids = [379, 382, 383]
queryset = Cart.objects.filter(product_id__in=ids)
serializer = CartSerializer(queryset, many=True)
class Cart(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
product = models.ForeignKey(Product, on_delete=models.CASCADE, related_name = 'cart_product')
jack
Dima
jack
In Cart model, you have product field so just use product__in
Dima
Dima
sorry, i have no data in db
jack
jack
Ah that's why
DeathLikeSilence
hello, I created two class models in model.py
one of them is a User (I mean client) another is a SellerUser(I mean someone who wants to sell their product)
Both of them should register and login
In setting.py I wrote this:
AUTH_USER_MODEL =’accounts.User’
The register is working, but login just works for User, not for SellerUser
What should I do?
In view.py in the login class I use authenticate and token
I use DRF and APIView
Rubi
Hello everyone
Today I have started learning django but now I got stuck that from where should I learn because someone recommended me to learn from you tube but according to documentation it is different so I am confused that which one should I follow
jack
nyctophile
hi there!
I was following rest framework you tobe tutorial but I am having this error when I try to runserver
ModuleNotFoundError: No module named 'products'
nyctophile
nyctophile
nyctophile