Azamat
Thanks, Do you have information about Nod js?
No, I'm using only react from npm, but you can read difference between django and nodejs in Google
Amit
Forum website in django??
If possible can please share me link or some other information in brief (i m beginner in IT field)
Anshu
For this
https://simpleisbetterthancomplex.com/tutorial/2016/11/15/how-to-implement-a-crud-using-ajax-and-json.html
Deep Narayan
Hi, is there a way to show a UI in django admin whenever a new entry is there in the database like in this picture? https://ibb.co/MPh1vWf
Shukurillo
I changed my timezone to this TIME_ZONE = 'Asia/Tashkent', but when I check through django shell it shows me different time. What should I do to make django show me my local time?
Vivek
How to implement api key based data retrieval in django rest framework? I want to generate a single api key that my client side application can use to fetch data
Shahrukh
I had a requirement like validating promo code in e-commerce web application. Any leads?
Doragonsureiyā
I had a requirement like validating promo code in e-commerce web application. Any leads?
So, why don't you do it yourself first? When you have an issue with the Python code you wrote (read rule 5️⃣ to show your code), come back here and people will help you. 😉
Shahrukh
Ok
Anshu
I had a requirement like validating promo code in e-commerce web application. Any leads?
Create a promo code in the database and check the user input against your promocode and do the needful calculations
Nitin
Why we are using signals in django is there have any alternative for same ...?????
Anshu
Why we are using signals in django is there have any alternative for same ...?????
Why do you need alternative for this, signals help app get notified when action occurs else where, such post_save or pre_save
Python Guy
https://dpaste.org/WRVH I want to reduce amount of code and delete redundant code, Please help by providing ideas or tools provided by drf to reduce code
Python Guy
Hi. In model for a field I want List.Eg class X(..): list= models.Something but I don't want text field, I want to store those as list.
Vaibhav
Thanks
Some additional fields are .. read about it in django docs
Abdulrasheed
Hello guys
Abdulrasheed
zoneinfo._common.ZoneInfoNotFoundError: 'No timezone found with key UTC' I am getting this error👆👆👆 when trying to load my admin page please help me out
Shahrukh
Hello guys I want multiple field validations from single clean method.
Shahrukh
def clean(self): user_cleaned_data = super().clean() inputFirstname = user_cleaned_data['firstName'] inputEmail = user_cleaned_data['email'] if len(inputFirstname) > 20: raise forms.ValidationError('The maximum length should be 20') if inputEmail.find('@') == -1: raise forms.ValidationError('The email should contain @')
Shahrukh
I'm getting only first validation but I want both
Shahrukh
My issue have been resolved
Syed
How to send form data from react js to firebase via django?
|King^Raj|
how to encrypt url in django
|King^Raj|
http://example.com/post/1 to http://example.com/vfdvdkfhdfvbkh
Sai Kumar
raise AssertionError("database connection isn't set to UTC") AssertionError: database connection isn't set to UTC
SuperN00b
How to send form data from react js to firebase via django?
u can send data to firebase directly , why need django
Syed
u can send data to firebase directly , why need django
Because my project is based on machine learning
Syed
Yes
Azamat
What the problem to solve this problem by sending data directly?
cj
like this
the easiest and simplest thing is to use uuid4 as pk
Anonymous
hi guys there is any reference that to compare processing in django template vs python? for instance for loop in django template are fastest than python ro not?
Rebellion
Friends, I have created ManyToMany field. But, when I ask user to fill a form, it does not accept this ManyToManyField. I mean user can select that field and save form. But, in database it does not show that field. But, if same operation is done through Django admin page, it gets added. Why..? What's Wrong here..? Any idea,..?
Rebellion
this 'tags' does not get saved in database through normal form. But, can work only through django admin page. Why..?
Rebellion
Did you use m2m save method for saving many to many fields in database?
I don't know. Please tell me. When I ask user to fill form, user gets a list of options of 'tags' and user has to select one tag out of it and then save the form. It seems okay at first place and form gets saved. But, this 'tag' does not get attached to model 'Post'
Rebellion
Did you use m2m save method for saving many to many fields in database?
Is there any special method to save m2m field...? please guide me.
Rebellion
class Tag(models.Model): name = models.CharField(max_length=30) class Post(models.Model): tags = models.ManyToManyField(Tag)
Rebellion
This is the relationship which I'm trying to create, but m2m field is not getting saved through form.
Alda
Is there any special method to save m2m field...? please guide me.
Yes, there is a method called save_m2m() in django.
Rebellion
model form ??
forms.py class PostCreateForm(ModelForm): class Meta: model = Post exclude = ('author', )
Fan / Ac
https://stackoverflow.com/questions/3074938/django-m2m-form-save-through-table https://stackoverflow.com/questions/5612991/saving-many-to-many-data-via-a-modelform-in-django
Rebellion
https://stackoverflow.com/questions/3074938/django-m2m-form-save-through-table https://stackoverflow.com/questions/5612991/saving-many-to-many-data-via-a-modelform-in-django
Yeah... Thanks a lot... I was using form(commit=save) That's why form was not able to save m2m field.... When I used form.save_m2m() it worked...
Rebellion
Rebellion
read the second link too :)
yeah, it helped to understand the issue...
Anonymous
I want to use redis as db to handle shopping cart ,have a doc about it?
Shakthi
Hi, I'm new to django... Anyone please help to solve it. I created class based views. Used html form tag for frontend, form.py is not used. How to assign task to particular user nd display it (Todo app) how to use Objects.filter()? # Model name: Task
Alireza
Hi, I'm new to django... Anyone please help to solve it. I created class based views. Used html form tag for frontend, form.py is not used. How to assign task to particular user nd display it (Todo app) how to use Objects.filter()? # Model name: Task
First you need a task model wich has relation with the user The. In class based view you should override the get_queryset method and return the desired query set in this way Task.objects.filter(user=self.request.user) Then the desires tasks will pass to the template Of course the user should be authenticated * I am not really sure about the get_queryset method name but must be something like that there😅*
Gulbahor
what is django session
Gulbahor
what is django session
can you informations this about
Alireza
Ali
You are welcome😉👍
Dude, check the groups we are both joined in..!!
Muhammadyor
Ali
Such a weird😅
Mind blowing 😂
Anonymous
how to use django-treebeard with Django Rest Framework
LB (Ben)
how to use django-treebeard with Django Rest Framework
What do you mean? Treebeard is a library to work with and store tree structured data.
Anonymous
What do you mean? Treebeard is a library to work with and store tree structured data.
i have create Category model class Category(Core, MP_Node): name = models.CharField(max_length=50, unique=True) slug = models.SlugField(max_length=50, unique=True, null=True) node_order_by = ['name'] def save(self, *args, **kwargs): if not self.slug: slug = self.name self.slug = slugify(slug) super(Category, self).save(*args, **kwargs)
Anonymous
but dont know to to deal with django-treebeard