Andrey
Hello, good night I have the following table and I am trying to make a filter, but it is not returning me anything. Can someone tell me what is wrong in my filter.
Andrey
filter: UrlOnion.objects.filter(last_date__month='03'))
Mirco
Use pastebin or similar pls
Mirco
Read the pinned message
Andrey
sorry
Andrey
https://pastebin.com/uRk2ZXC0
syedj
Try by yourself
How can I handle that in viewsets?
Opeyemi
Hello everyone, Am Gabriel aslan a web developer from nigeria, am happy to be here
R
https://pastebin.com/uRk2ZXC0
Why trying to track TOR urls?
Kev
Hello everyone, Am Gabriel aslan a web developer from nigeria, am happy to be here
Welcome Gabriel, hope you learn new things here and help others as well. cheers
Opeyemi
Am looking forward to learning alot, am very new to django
Namitha
*exist
Namitha
How do I resolve that error?tried
Namitha
How do I resolve that error?tried
Tried googling it but cudnt get a proper answer
Kev
While I was doing this, i got a operational table does not exost error
make sure you have the table first, and if you do,.. make migrations
Sebuhi
With django-rest is it possible to use requests api within
do you have any exxample with rest? sending request to machine and getting response throught HTTP protocol?on the internet no any example,
Sebuhi
Yep why not
yeah right but have not have example
Sebuhi
No example of REST ?
there are many, but not the one proper one to work with postman
Mirco
there are many, but not the one proper one to work with postman
have you ever read Django Rest official docs ??
Mirco
Sebuhi
have you ever read Django Rest official docs ??
let me see them as well, I am already mixed up wathing many videos reading blogs, cant get into what I really need.
Sebuhi
let me tell you simply like this, the thing is the machine is on aurdiono written on C low level, it is really difficult to handle do many things, we want to keep it as simple as we can, evertyhing will rely on to the our web app. machine suppose to send request in each minute and get response to each request. data comes in each minuet as str, we need to parse the data and send reponse to take actions,
Mirco
And you can use MQTT
SENATOR ARMSTRONG
Hello
SENATOR ARMSTRONG
Can I ask there questions regarding django rest framework?
Sebuhi
Classic scenario
many things to discover) anyways thank ypou for your support and help!appreciated it
Sebuhi
go ahead
Andrey
Why trying to track TOR urls?
This is a safety project.
Andrey
Are you getting an empty queryset or an error?
I was getting empty, but I already managed to solve it, it was a problem with the mysql timezone
Andrey
solution: mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
Anonymous
Guys I need to know if a button is clicked on a website it should send a text message to the receiver from the database
Anonymous
Any help?
Anonymous
The backend process
Anonymous
We r actually developing a webApp
Neo
hello all I have a class based view: class View( GroupRequiredMixin, LoginRequiredMixin, CreateView ): group_required = [u'a', u'b, u'c'] and I have session data: def get(self, request, *args, **kwargs): if int(request.session['some_user']) != 0: """some code to alter group_requerd""" is it possible to alter group_required if session have "some_user"
R
If so, look here: https://django-braces.readthedocs.io/en/latest/access.html#dynamically-build-groups
Guillermo
yes
Check UserPassesTestMixin and see if It works for you
R
Check UserPassesTestMixin and see if It works for you
Why? The mixin he used has already one method ready to override for his use case
Guillermo
Why? The mixin he used has already one method ready to override for his use case
🤷‍♂ Just in case he is looking for something more general and not only based on groups
Neo
If so, look here: https://django-braces.readthedocs.io/en/latest/access.html#dynamically-build-groups
do this method able to find curent session user before rendering html
R
It hooks the dispatch method of the view and during validation you have access to the request with its user,etc
R
Sometimes its easier to just look at the source https://github.com/brack3t/django-braces/blob/master/braces/views/_access.py
Neo
ok thanks 😊
Praful
Hello everyone , i have 1 year ex. in odoo framework right now i am start learning django so please any buddy help me
Anonymous
Hi everyone
Praful
ok i am starting now get any issue so told you
Neo
If so, look here: https://django-braces.readthedocs.io/en/latest/access.html#dynamically-build-groups
it isnt working returns error: return self._session[key] KeyError: 'some_one' on: def get_group_required(self): # Get group or groups however you wish if int(self.request.session['some_one']) != 0: print('yes it is') group_required = [u'a', u'b', u'c'] return group_required
Anonymous
I want to know about the group
Anonymous
Ask then
Tell me about the group
cj
Tell me about the group
why? you can read the description
Guillermo
@Futureyhg read the pinned message
Neo
You sure that session has ‘some_user’?
actualy it is impersonate login so current user have loged in as 'some_user' hence it should have 'some_user'
Neo
You sure that session has ‘some_user’?
its working now of no reason. don't know what was stoping it then. anyways thanks alot
Shekhar
can someone help me with django-twilio??
Mirco
can someone help me with django-twilio??
No meta questions pls read the rules Ask directly
Shekhar
ok
Mirco
ok
Thanks 😁
Shekhar
I want to pass the form data to task.py from view
Shekhar
and time parameters to cronjob using celery!!
Shekhar
need some help
Mirco
Share your code with pastebin or similar to help us understand better your issue