Questions tagged [django-datatable]

django-datatables-view is a base view for handling server side processing for the awesome datatables. django-datatables-view simplifies handling of sorting, filtering and creating JSON output.

django-datatables-view is a base view for handling server side processing for the awesome datatables found here.

django-datatables-view simplifies handling of sorting, filtering and creating JSON output, as defined here.

47 questions
15
votes
3 answers

Datatables custom filtering with server side

I'm using DataTables and also using server side processing (Django). I have a seperate textfield in which I use it to custom filter data in the DataTable after the table has been rendered already. The following works just fine (I want to custom…
Amir Mog
  • 321
  • 1
  • 4
  • 17
4
votes
0 answers

djongo.sql2mongo.SQLDecodeError: FAILED SQL: SELECT COUNT(*) FROM with mongodb django

I am getting the below error on a select query with MongoDb in Django. SELECT COUNT(*) FROM (SELECT DISTINCT "datacollection_computed_host_details"."id" AS Col1, "datacollection_computed_host_details"."HOST" AS Col2,…
3
votes
0 answers

Django: Save ContentFile (or some kind of virtual file) to database

In my django app I create a string which I have to save to my database as a File. If i understand correctly, django is supposed to automatically upload the file when I save the entry: class Foo(models.Model): bar1=models.ForeignKey(Table1) …
2
votes
1 answer

How to get table data based on id which obtains from another table data? Django

Views company = Company.objects.get(id = company_id) # getting input from django urls () vehicles = CompanyContainVehicles.objects.filter(company_id=company.id) # Give all rows having same id (company.id) all_vehicles =…
2
votes
0 answers

Related Model Column Names in django-datatables-view

I'm trying to work with django-datatables-view to add some basic filtering and sorting to my ListView. I have a Result model, which has a FK relationship to a Test model. The Result model has fields status and when, and the Test has fields 'name',…
cdm
  • 719
  • 2
  • 10
  • 22
2
votes
1 answer

Datatable not displaying using Django-datatable-view

I'm trying to implement datatables.js using django-datatable-view, (not to be confused with django-datatables-view), and have started with the zero configuration datatable type: http://django-datatable-view.appspot.com/zero-configuration/ I've…
Jed
  • 638
  • 1
  • 8
  • 17
1
vote
1 answer

Pass a filtered field to views.py for further operation

I'm pretty new to Django working in a small project. I need to have the logged in user to be able to see the total of taxes. In the user model is every users info, including each of these taxes, I need to have them called in the views.py so I can…
1
vote
1 answer

Error while changing database engine to PostgreSQL

I got this error after changing the engine, the database is connected however it figured out my id field is a bigint, yet I specifically set it as a UUID field. class Cart(models.Model): id = models.UUIDField(default=uuid.uuid4,…
1
vote
1 answer

Retrieving data from Django HTML form and passing it to a MySQL database

I have a database with multiple user names and phone numbers attached to each user. On the Django template that I created the user is presented with a list of names, and the user can click on a name, or multiple names, and the database is to respond…
1
vote
1 answer

Add row Id in Django data table

I am using django datatable the data that come from server has the following format: [ ['id_value','data col1','data col2',...] . . .] I am try to make id to every row as follow: 'rowId': 1, but it doesn't work my html code:
AlASAD WAIL
  • 775
  • 4
  • 18
1
vote
1 answer

django datatables manytomany field serverside processing

In my Django project, I am using the datatables.net jquery plugin to display some of the data from my Django models in a table. I am using this to do the serverside processing. Everything works well, but I have to display some data from another…
1
vote
1 answer

Sorting custom columns with django-datatables-view

Using Django 3, python 3.6, django-datatable-view 1.19.1 Trying to do a datatable with columns from my model and computed before output ones. I draw all values that I needed but after trying to sort custom column getting an error: Cannot resolve…
Ihor KKK
  • 13
  • 4
1
vote
1 answer

Django Translation Internationalization and localization: forms, models, tables

I have two questions. How can I translate in forms: a) labels b) Form ValidationErrors ? forms.py from django import forms from django.db.models import Max, Min from .models import Application, FlowRate, WaterFilterSubType, Fineness, Dirt from…
cegthgtlhj
  • 191
  • 1
  • 8
1
vote
1 answer

How to redirect django-datatables-view to proper HTML template?

I'm setting up a web app/database with the django framework. I'm trying to view the results from a query, with user input values from a form, into a datatable on another page using django-datatables-views. My_project/search/views.py class…
test_tube_b
  • 85
  • 1
  • 7
1
vote
0 answers

Filter Many-to-Many Field with Django DataTable

I have a Django view created with django-datatables-view: class ActivityListJson(BaseDatatableView): columns = ['description', 'entities'] max_display_length = 500 def get_initial_queryset(self): return…
OverflowingTheGlass
  • 2,324
  • 1
  • 27
  • 75
1
2 3 4