Add variable value in render field in django template

2020-11-20 Thread Rajshree Some
Hi Users,
I have a value in variable occurence counter and I want to pass this value 
in this render field .Can anyone help it?

{% render_field class+='form-control' data-id="occurence_counter " %}

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3f593db4-e68b-45f7-82e1-047d05993dddn%40googlegroups.com.


How can i send formdata and other data in ajax post

2020-11-10 Thread Rajshree Some
I have a Ajax post method where I am sending mutiple data but now I want to 
add formdata and capture it in post method as object.Can I do that?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4a8bd691-dea1-4787-8910-d04dc2d72c0cn%40googlegroups.com.


join query to get the maximum value in django orm

2020-07-13 Thread Rajshree Some
Table1
id  namecomment

1

Item1

Bad

2

Item2

Good

 


 

Table2

Id 
table1_id   
 
 marks  

1.

1

23

2.

1

54

3.

2

66

4.

2

55

I want to write a single query to fetch the maxium marks of each item and 
update the parent table each item comment with bad if the max is less 60 
and good if the max is greater that 60

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/376231cf-0d72-4c04-a931-b268840c4dbao%40googlegroups.com.


how to retrieve maximum value in many to many field

2020-07-13 Thread Rajshree Some


Table1

id

1

Item1

Good

2

Item2

bad


  

Table2


Id 
table1_id   
 
 marks  

1.

1

23

2.

1

54

3.

2

66

4.

2

55

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a95d04e7-969e-4737-bc48-e0b4dd148995o%40googlegroups.com.


raise DatabaseError('ORDER BY term does not match any column in the result set.')

2020-06-29 Thread Rajshree Some
how to send a union queryset in get_initial_queryset of django

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/03802920-7e62-4c21-806d-667fd4f4e451o%40googlegroups.com.


union in get_initial_queryset in datatable

2020-06-29 Thread Rajshree Some


list=Model1.objects.filter(
 reservation__in=Model.objects.filter(resource__in=resources).union(
Model2.objects.filter(
 
reservation__in=Model.object.filter(resource__in=resources).defer('col4','col5','col6'),
 
 Model3.objects.filter(
 reservation__in=Model.objects.filter(resource__in=resources),\
Model4.objects.filter(
 
reservation__in=Model.objects.filter(resource__in=resources).defer('col4')


I am trying to resturn this queryset in get_initial_queryset in datatable.But 
getting an error 

raise DatabaseError('ORDER BY term does not match any column in the result 
set.') 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/454e3bec-accf-4bb5-9eb5-1a0c833a4527o%40googlegroups.com.