Д.....
My request.POST contains only the last form in my formset.Can you help me pls ? Here is my code - https://stackoverflow.com/questions/76492114/django-request-post-contains-only-the-last-form-in-my-formset/76494222#76494222 . Thanks!
Fitzgerald
i wanted recommendation on books on django . ie i struggle with does concepts for view and models . any help with be welcome
Doragonsureiyā
i wanted recommendation on books on django . ie i struggle with does concepts for view and models . any help with be welcome
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Mimi Khalid
Hello. How can I pass api response value from html to views.py ?
Soham
That is the most efficient way to do it
ERMIA
A table
You want to transform a table to pdf?
Francesca
Thank you so much
Did you solve ?
Soumia
Hello I have a problem in django can you help me
¯\_(ツ)_/¯
Hi could someone help me with setting up an OTP service in django
¯\_(ツ)_/¯
I implemented it with the help of twilio...but then one or two methods in the viewset aren't working as was expected
Anonymous
Hi there! Anyone please instruct me how deploy django application in railway.app website?
Doragonsureiyā
Hello I have a problem in django can you help me
No one can help you until you explain your difficulties.
Д.....
Did you solve ?
Yeah, thanks!!!
Francesca
Soumia
Discuss your problem with us
When I want to clone my project, they tell me to download Pylance and Pylante But I already did it so I don't really understand what I should do
Grib.Club
holla. anybody have a clue i use pycharm and after something happened ./manage.py runserver start vscode instead of server, how to change it back?
MA.F
Hi. I'm having some problems with testing my endpoints in drf because of the throttling in my endpoints. I want it to be disabled for some tests and enabled for the test case that tests the throttling. Does anyone know what's the proper solution?
Derrick
Using Django?
Derrick
You wrote all that?
Careful
Hi, If you want to create/export pdf file, you can use Django reportlab module
Using Django?
Yes or even if js can get me the table in a pdf format
Hi, If you want to create/export pdf file, you can use Django reportlab module
I tried that but it is not getting the structure of the table I want
Careful
Careful
https://youtu.be/B3OCXBL4Hxs
Careful
Watch this
Tԋҽ Gɾҽαƚ
Please. How I fixe this error: A server error occurred. Please contact the administrator. This error appears when I run Django
.
I need some resources to learn AJAX crud functionality
.
Thanks
K
Hello everyone...I am working with a start-up and worked on different types of work like react, django, flutter..Now I want to switch in a particular field to enhance my skills properly...Is any job available for django...I have 1 yr of experience
◻
hey um, i have this multivendor ecommerce django project and i tried to host it in digital ocean - not free, azure - not free, same with railway and heruko, please tell me if you know any free services
Doragonsureiyā
hey um, i have this multivendor ecommerce django project and i tried to host it in digital ocean - not free, azure - not free, same with railway and heruko, please tell me if you know any free services
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Amit
Can anyone tell me how to solve this error:- Modelform has no model class specified
Amit
Yes offcourse
Maxim
Can u share some screenshot of the modelform
don't give bad advice screenshots are forbidden
Amit
Sending media is not allowed in this group
Amit
from .models import Appointment from django import forms class AppointmentForm(forms.ModelForm): class meta: model=Appointment field='all'
theDisgrace
Maxim
Sending media is not allowed in this group
read the rules to find out how to share code and errors text
theDisgrace
Use two underscores
Amit
from .models import Appointment from django import forms class AppointmentForm(forms.ModelForm): class Meta: model=Appointment field='all'
Amit
it is automatically remove underscores
theDisgrace
Just as you write init in class
¯\_(ツ)_/¯
Hi could someone help me with setting up an OTP service in django I implemented it with the help of twilio...but then one or two methods in the viewset aren't working as was expected
¯\_(ツ)_/¯
Hi could someone help me with setting up an OTP service in django I implemented it with the help of twilio...but then one or two methods in the viewset aren't working as was expected
https://dpaste.org/X6hoq While testing the get_entered_otp method I'm able to register the user in the UserModel but then the response it returns is either "Please enter the correct OTP." or "Try again after 1 hour", when it should be "OTP verification successful."
fateme
I have a m2m_changed signal that does not work. can anyone help me ?
Doragonsureiyā
fateme
I have a m2m_changed signal that does not work. can anyone help me ?
post save or pre save works correctly, but m2m change not. here is my code : @receiver(signals.m2m_changed, sender=models.ManualStation.operators.through) def send_notification_to_new_operators(sender, instance, action, model, pk_set, **kwargs): print("===========opps============") print(instance) print(type(instance))
fateme
post save or pre save works correctly, but m2m change not. here is my code : @receiver(signals.m2m_changed, sender=models.ManualStation.operators.through) def send_notification_to_new_operators(sender, instance, action, model, pk_set, **kwargs): print("===========opps============") print(instance) print(type(instance))
It does not trigger at all. and it is the definition of operators field in ManualStation model : operators = models.ManyToManyField( "users.MyUser", verbose_name=_("Operators"), related_name="stations", blank=True )
David H
It does not trigger at all. and it is the definition of operators field in ManualStation model : operators = models.ManyToManyField( "users.MyUser", verbose_name=_("Operators"), related_name="stations", blank=True )
I'm not sure, but the solution could be to use set instead of: add, remove, or clear. Because all of these trigger m2m_changed signal multiple times.
David H
It's strange that it is never fired
David H
sorry , I did not get your mean. can you expmalin more ?
Add remove and clear are methods to modify the m2m relation, if you use set instead the receiver maybe would be fired
fateme
Add remove and clear are methods to modify the m2m relation, if you use set instead the receiver maybe would be fired
the matter is that I did not use each of them manually. I use django admin panel and add many to many field to the second model.
David H
the matter is that I did not use each of them manually. I use django admin panel and add many to many field to the second model.
I am not sure about which of the mentioned methods is django admin using by default :/
David H
Another approach you could implement is to try to access the proxy table that joins both models and make it fire the event. If you could't access it you could implement the many to many explicitly by a through model and then make it fire the event
David H
Maybe this is a bit complex, it has to be a better approach, but if you didn't find anything... It could be nicer than nothing
fateme
I am not sure about which of the mentioned methods is django admin using by default :/
I found some part of the bug. It works correctly in shell. while using add(). in admin panel I use inline. and I think it is becuase of that. anyway thank you for spend time on my problem. now I should find the way to figrure this out.
bhzad
Hello, Friends, do you know that this course is taught in a version of Django?Is there a useful tutorial? Has anyone prepared from you?Thank you for your guidance Course link:https://www.udemy.com/course/python-django-real-world-project-multi-vendor-restaurant/
VI
hello everyone. tell me. who knows... (a simplified version will be presented) class Tender(models.Model): product = models.ForeignKey(Product, on_delete=models.CASCADE) price = models.DecimalField(max_digits=4, decimal_places=2, default=0) class AddTenderForm(forms.ModelForm): class Meta: model = Tender fields = 'all now I want to write a form template from the model. and I know that you can do something like {{form.as_p }}, but I NEED to throw the product and price fields into different divas with different classes (template below) HOW DO I DO THIS? html for product <div class="col-12"> <label for="id_product" class="form-label">Product</label> <select class="form-select" name="product" id="id_product" required> <option value=""disabled selected></option> <option>{{ product }}</option> </select> <div class="invalid-feedback"> -- </div> html for price <div class="col-md-3"> <label for="id_price" class="form-label">Price</label> <input type="number" class="form-control" name="price" id="id_price" placeholder="Price" required> <div class="invalid-feedback"> -- </div> </div>