Re: Django REST framework nested query.

2017-11-06 Thread Xavier Ordoquy
Hi, You are looking for nested serializers. Documentation explains how to deal with them at: http://www.django-rest-framework.org/api-guide/relations/#nested-relationships Regards, Xavier, Linovia. > Le 7 nov. 2

Django REST framework nested query.

2017-11-06 Thread Shamim Hossain
I am switched to Djangorest framework from Nodejs. I don't know how can I start to solve following problem. I have two django model named Category and Product. In Category model has "is_featured" boolean field. I need category list in JSON format where is_featured=true and the list of product

Re: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
On Monday, November 6, 2017 at 9:36:11 PM UTC+1, Matthew Pava wrote: > > Is it really that bad? Maybe I’m missing something in your situation. > Ooooh, it isn't really. I incorrectly assumed that the query would perform like having an implicit DISTINCT(device.id). But it does in fact return abs

Re: DJANGO app loose path from batch file

2017-11-06 Thread Mike Morris
On 11/06/2017 10:12 AM, Xristos Xristoou wrote: i am windows user My condolences. -- 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...@go

RE: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Matthew Pava
Is it really that bad? Maybe I’m missing something in your situation. I use my own custom page_queryset function. I never got around to looking at the built-in Django way of doing it. I think there is a generic view that can do paging. q = Device.objects.filter(hostname__contains= 'localhost

Re: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
On Monday, November 6, 2017 at 9:15:09 PM UTC+1, Matthew Pava wrote: > > Maybe you are expecting too much from the user interface. Shouldn’t you > at least request from the user what primary object you are looking for? > The primary model is always that one that is closest to "device"; step 2

RE: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Matthew Pava
Maybe you are expecting too much from the user interface. Shouldn’t you at least request from the user what primary object you are looking for? Explicit is better than implicit. Your example indicates that your primary object is a Device, but your UI dict gives no indication whatsoever that t

Re: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
Thanks, I have seen that and plan to use it, but for this particular feature I need something more tailored. -Samuel On Monday, November 6, 2017 at 8:56:29 PM UTC+1, Matthew Pava wrote: > > Though it doesn’t directly answer your query, you might be interested in > this package: > > https://gith

RE: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Matthew Pava
Though it doesn’t directly answer your query, you might be interested in this package: https://github.com/burke-software/django-report-builder From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Samuel Abels Sent: Monday, November 6, 2017 1:33 PM To: Django u

Add a processing page between submit page and result page

2017-11-06 Thread Ruifeng Hu
Hi All, I am writing a project, on the submit page, a user submits some parameters, then the server side will take a calculation that may take a while, I want to add a waiting page to tall users that it is running on the server. When the result is ready, it will automatically jump to the result

Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
I am working on a reporting feature that allows users for querying arbitrary models and fields, and present the result as a table. For example, consider the following object model: Package | v Device <- Component ^ ^ | | | Interface <---2--- Connection

Re: Problems with dumpdata/loaddata

2017-11-06 Thread Jani Tiainen
Hi. Maybe it would be useful to create ticket to document this behavior in Django documentation. 6.11.2017 8.21 ip. "Matthijs Kooijman" kirjoitti: > Hey folks, > > I'm replying to an old thread about a problem with "manage.py loaddata" > generating a BOM (byte-order-mark) that "manage.py dumpda

Re: Problems with dumpdata/loaddata

2017-11-06 Thread Matthijs Kooijman
Hey folks, I'm replying to an old thread about a problem with "manage.py loaddata" generating a BOM (byte-order-mark) that "manage.py dumpdata" refuses to load. I just ran into this same problem and found that, in my case, the problem is not "loaddata", but powershell which I was running under.

Re: DJANGO app loose path from batch file

2017-11-06 Thread Xristos Xristoou
i am windows user -- 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 post to this group, send email to django-users@

Re: DJANGO app loose path from batch file

2017-11-06 Thread Daniel Roseman
On Monday, 6 November 2017 15:43:36 UTC, Xristos Xristoou wrote: > > I try to learn more about Django celery and rabbitmq to create some async > tasks and I have some question. > > Some programs can provide PYTHON API to can some development to use > modules from this program in python. > > one m

DJANGO app loose path from batch file

2017-11-06 Thread Xristos Xristoou
I try to learn more about Django celery and rabbitmq to create some async tasks and I have some question. Some programs can provide PYTHON API to can some development to use modules from this program in python. one most way to take that PYTHON API from this program is to use batch file like

Guidance with testing reusable app the way Django does

2017-11-06 Thread Ramez Ashraf
Hello dear developers, I need your help in creating a test suit similar to Django's in the sense that tests are in separate folders (modules), each might contain models of their own. I cheated from the runtests.py Django have, edited out some warning and so. The problem is that the apps are not

Re: OSError: [Errno 13] Permission denied:... /_dummy_thread

2017-11-06 Thread Avraham Serour
don't use sudo to pip install packages, you should create a virtualenv for your project On Mon, Nov 6, 2017 at 8:24 AM, Vineet Kothari wrote: > try to update your python : https://stackoverflow.com/ > questions/2720014/upgrading-all-packages-with-pip > > On Mon, Nov 6, 2017 at 12:10 AM, Mel DeJe