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
0
votes
1 answer

Name 'member_one' is not defined error in django

I want to get all Message_thread_private instances from database but I am getting error NameError: name 'member_one' is not defined Models.py: class Message_thread_private(models.Model): member_one = models.ForeignKey(User,…
0
votes
1 answer

Is there anything i missed in configuring django-rest-framework-datatables, getting error "DataTables warning: table id=test - Ajax error"

I tried to configure datatables with rest frame work, i'm getting error when page loads all the datatables fields like pagination, search and title is showing but no data is showing. what might be the reason? serializers.py class…
0
votes
2 answers

django not able to save all incidents in database

I have a working code which gets all incident details. But i am unable to save complete data in database only the last record gets saved def incidents(request): incidentsServicenow = IncidentsServicenow() c = pysnow.Client(instance='', user='',…
0
votes
1 answer

Django model with dynamic db tables

I am using Django to interface with another (JAVA) application that based on some events generates at runtime tables in the db with the same model. So I don't have a direct control over the DB. For example: Sensor1 id | value | time 1 10 …
palamunder
  • 2,555
  • 1
  • 19
  • 20
0
votes
0 answers

Django-datatable-view throwing error after decorating url

I am using django-datable-view for rendering data from django models. Everything works fine before decorating the url, after i added login_required to the url, it threw weird error. According to the doc, it states that i can add login_required to…
0
votes
0 answers

Django-Datatable-View Dynamically Filter Model Queryset based on URL parameters?

I'm using django-datatable-view (https://github.com/pivotal-energy-solutions/django-datatable-view) and I'd like to dynamically pass URL parameters to the DatatableView and filter get_queryset() based on those URL Parameters. Here is an example…
btal
  • 81
  • 6
0
votes
1 answer

How to define dynamic number of columns in django-datatables-view

I'm using the django-datatables-view (that is used in conjunction with the jQuery plugin DataTables). For normal use, I create a class-based view based on BaseDatatableView and define there the columns variable: class MyCBV(LoginRequiredMixin,…
Patrick
  • 2,577
  • 6
  • 30
  • 53
0
votes
2 answers

create a filter in django-datatables-view

I use django-datatables-view to render a huge dataset. I try to filter 'flat_price'. It should be less or equal than a number that user writes in an input field That's my DataTablesView: class OrderListJson(BaseDatatableView): model = Flat …
mailman_73
  • 778
  • 12
  • 29
0
votes
1 answer

Django: Get model field data from a model field data

I have something like this in views.py. if form.is_valid(): ref_user = User.objects.get( username=form.cleaned_data['referrer']) if User.objects.filter(username=ref_user).exists(): user =…
0
votes
2 answers

Django table with specific relation to two or more other tables

How is it possible to create a relationship like this: Imagine a restaurant. Among their datatables is one for recipes and one for ingredients. And there is another one, which contains categories of food such as dinner, lunch, breakfast, dessert,…
0
votes
1 answer

filter for multiple record based on latest timestamp

I have the following table: Record Created Name Group 1 July 23, 2015 John Group 1 2 July 21, 2015 April Group 1 3 April 4, 2015 John Group 1 How do you filter for the latest distinct record? In…
H C
  • 1,138
  • 4
  • 21
  • 39
0
votes
2 answers

django-datatables-view load filtered model

Here we have the basic code for getting django-datatables-view to display from django_datatables_view.base_datatable_view import BaseDatatableView class OrderListJson(BaseDatatableView): # The model we're going to show model = MyModel …
RuSs
  • 769
  • 2
  • 12
  • 27
0
votes
1 answer

Sharing variables between urlpatterns in Django

Here is my urls.py from django.conf.urls import patterns, url, include from geartables import views from geartables.views import DataTable urlpatterns = patterns('', url(r'^$', views.index, name='index'), …
David
  • 71
  • 1
  • 9
0
votes
1 answer

django-datables error - No handler could be found?

I am using the django-databtables-view app, but I get this following error in my console. what am I missing here? No handlers could be found for logger "django_datatables_view.mixins" I included the logging in my settings.py LOGGING = { …
brain storm
  • 30,124
  • 69
  • 225
  • 393
-1
votes
1 answer

model doesn't have migrations

I am working on the Django model. I migrate all the files of the app, but it is showing me the model doesn't have migrations and also no migration file in the folder, but init.py file exists in the folder. Please give me suggestions. admin [X]…