Making an OR condition in a Queryset using .filter(**mydict)

2020-01-10 Thread Ezequias Rocha
model.filter(**data) It works but all conditions in data dictionary are treated as an *AND * operator. Does anyone knows how to apply the *OR *(|) condition to this filter? My best regards Ezequias Rocha -- You received this message because you are subscribed to the Google Groups "Djang

Re: Make a Django query filter at runtime

2020-01-10 Thread Ezequias Rocha
y 8, 2020 at 10:08:18 PM UTC-3, Alex Conselvan de Oliveira wrote: > > Hi Ezequias, > > You could use a dict: > > data = { > 'name': 'John', > 'age': 42, > } > > model.filter(**data) > > Best Regards! > > Em qua., 8 de jan. d

Re: Make a Django query filter at runtime

2020-01-09 Thread Ezequias Rocha
data) > > Best Regards! > > Em qua., 8 de jan. de 2020 às 18:09, Ezequias Rocha > escreveu: > >> Hi everyone >> >> I am in a doubt about creating django filters dynamically. >> >> All you know a filter is made by using the parameters like: >> >&

Re: Make a Django query filter at runtime

2020-01-09 Thread Ezequias Rocha
'John', > 'age': 42, > } > > model.filter(**data) > > Best Regards! > > Em qua., 8 de jan. de 2020 às 18:09, Ezequias Rocha > escreveu: > >> Hi everyone >> >> I am in a doubt about creating django filters dynamically. >> >&g

Make a Django query filter at runtime

2020-01-08 Thread Ezequias Rocha
Hi everyone I am in a doubt about creating django filters dynamically. All you know a filter is made by using the parameters like: model.filter(name='John', age=42) But if I can't type all fields and values at design time but at runtime how to do that? Best regards Ezequias -- You received

Re: Get authorization and list users in auth via http request

2019-09-12 Thread Ezequias Rocha
ent.com/django-rest-framework-user-authentication-tutorial/ > > Regards, > Ronnie > > On Thu, Sep 12, 2019 at 2:01 AM Ezequias Rocha > wrote: > >> Dear Gabriel >> >> I have already access to the get method but not the creation service. >> >> I wil

Re: Problems with "Class Meta" and " __str__"

2019-09-11 Thread Ezequias Rocha
In your base model write a function like this (if your description field is called 'name'): def __str__(self): return self.name It works for me. PS: Take care of python identation. I don't know if your tabulation is the same you paste here in forum but it placed wrongly could compro

Re: Get authorization and list users in auth via http request

2019-09-11 Thread Ezequias Rocha
this batch loading of users from scratch (and without any register form)? Sincerely Ezequias. On Monday, September 9, 2019 at 7:32:28 PM UTC-3, Gabriel Araya Garcia wrote: > > ...and why you don't use the Django admin app ? > > El lun., 9 sept. 2019 a las 15:00, Ezequias Ro

Get authorization and list users in auth via http request

2019-09-09 Thread Ezequias Rocha
Hi everyone Could someone tell me if Django encourages the community to implement auth/user authentication and user creation via http requests? I would like to *create *new users and *get users list* via a simple POST/GET http requests. Have someone did it here? Sincerely Ezequias -- You re

Re: Channels: launching a custom co-routine from SyncConsumer

2019-08-30 Thread Ezequias Rocha
Sorry my dalay also. My problem is that I was looking for a wrong PostgreSQL sequence. My fault, my totally fault. Django rocks! Sincerely Ezequias Rocha On Wednesday, August 28, 2019 at 11:26:25 AM UTC-3, Dan Merillat wrote: > > On 8/15/19 11:10 PM, Andrew Godwin wrote: > >

Unsynchronized sequence

2019-08-28 Thread Ezequias Rocha
Hello everyone I am using django rest framework and I noticed that even I changing the current sequence in my database (PostgreSQL) the next element in database (generated by django) isn't created as I expect. Could someone tell me if you have experienced this before? Best regards Ezequias --

How to call an action from outside admin

2019-08-25 Thread Ezequias Rocha
Hello everyone I am using admin actions and it is great and easy. Butner if I want to use the same function used by admin from outside (I.E. Postman HTTP request or a website request). How do the Django rest framework provides me? Best regards Ezequias -- You received this message because

Get queryset outside models.py

2019-08-23 Thread Ezequias Rocha
Hi everyone I would like to know if it is possible to retrieve *models*.mymodel instance from outside the models.py to retrieve a queryset. I want to make a selection in a specific model but I am not inside the model. I need to perform some update in my action model but the information is in

Re: Chat bot sholud use API

2019-08-22 Thread Ezequias Rocha
I wouldn't do that. You will have too much effort to suppress this endeavour. Use Google Dialogflow and be happy. On Thursday, August 22, 2019 at 10:57:07 AM UTC-3, UNIQ technologies wrote: > > Hi, > > > > I want to create a chatbot for my own website without any third party > Applicantions and

Re: UI for python windows applications

2019-08-22 Thread Ezequias Rocha
disconsider. On Thursday, August 22, 2019 at 10:36:11 AM UTC-3, Ezequias Rocha wrote: > > VSCode > > On Wednesday, August 21, 2019 at 2:46:57 PM UTC-3, ARAVIND BALAKRISHNAN > wrote: >> >> Can anyone suggest me any modern UIs for python application in windows >>

Re: UI for python windows applications

2019-08-22 Thread Ezequias Rocha
VSCode On Wednesday, August 21, 2019 at 2:46:57 PM UTC-3, ARAVIND BALAKRISHNAN wrote: > > Can anyone suggest me any modern UIs for python application in windows > other than electron > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Custom action with security

2019-08-22 Thread Ezequias Rocha
Hi everyone I am using a custom action in admin, it is simple but not secure. I would like some custom actions would work only for some users and i think it could be done with a different url and a differente authorization role (in Admin). Could you give me some advice to make this issue work

Re: IndexError: Number of args exceeds number of fields

2019-06-19 Thread Ezequias Rocha
> support Python 3.7 so it'd > start by either using Django 2.2 or downgrading to Python 3.6 > > Cheers, > Simon > > Le mercredi 19 juin 2019 08:16:51 UTC-4, Ezequias Rocha a écrit : >> >> Hi everyone >> >> I am doing a modeling of my dat

IndexError: Number of args exceeds number of fields

2019-06-19 Thread Ezequias Rocha
Hi everyone I am doing a modeling of my database on DJANGO and after almost 10 tables I did another model configuration and after making my *admin.site.register(baseclass, basecalassAdmin)* I got the following error message: *IndexError: Number of args exceeds number of fields* Could anyone

Sample of GeoDjanco websites

2018-03-19 Thread Ezequias Rocha
Hi I would like to know if there is any list of websites that are using GeoDjango on the web. Could anyone tell me if you have experiences putting Leaflet in the frontend and GeoDjango in the backend (geoprocessing). Sincerely Ezequias -- You received this message because you are subscribed