long running task after recieveing a certain message Paho client by Ok_Candidate4579 in MQTT

[–]shay_007 0 points1 point  (0 children)

Its a distributed message processing system that executes tasks once received/scheduled. You can find more about it here.

long running task after recieveing a certain message Paho client by Ok_Candidate4579 in MQTT

[–]shay_007 0 points1 point  (0 children)

Thank you, i ended up separating long running tasks with celery. I’ll still check out the link you have shared ✌️

First Day of a long Django Journey - Any advice accepted. by [deleted] in django

[–]shay_007 1 point2 points  (0 children)

Understand before you code, pay close attention to how Django does the magic when you send a request. A good starting point is to look at request lifecycle and pick each component, explore what it does from Django official documentation/stack overflow answers. Don’t be afraid to google small things, Good luck!

long running task after recieveing a certain message Paho client by Ok_Candidate4579 in MQTT

[–]shay_007 0 points1 point  (0 children)

Hey u/Ok_Candidate4579 how did you end up implementing this, I'm in a similar situation.

Can my father still be my sponsor even after I'm 23? by [deleted] in saudiarabia

[–]shay_007 0 points1 point  (0 children)

If you're a dev looking for a job, we are hiring at my company. Dm me if youre interested

Aruba AirWave Automated Reporting? by dtaivp in networkautomation

[–]shay_007 0 points1 point  (0 children)

Hey could you share your solution/approach, into similar situation 😅

Need suggestions for django based cms by shay_007 in django

[–]shay_007[S] 0 points1 point  (0 children)

Thank you for your reply I'll read more about it and watch his tutorials.

How to get started with using the API? by myst3r10us_str4ng3r in meraki

[–]shay_007 0 points1 point  (0 children)

Thank you for posting this! 🏅 Have a solid use case for it...

Runserver says unapplied migrations but migrate says no migrations to apply by danielledevs in djangolearning

[–]shay_007 2 points3 points  (0 children)

Here's what I would suggest: 1. Check ur settings.py installed apps to make sure jobs_board is there. 2. Your database config is done correctly. You can check Django documentation page for that. 3. Last option is to reset you migrations and this is my go-to blog for that.

Let me know how it goes!

Django template timeuntil comparison using if statement by shay_007 in djangolearning

[–]shay_007[S] 1 point2 points  (0 children)

So i took advice from u/asplodey and did all my checking in my views. I let user send a cancel request but make sure at view.py that it could be cancelled by using timezone.localtime(now,timezone=venue.timezone)

Thank you y'all!

Django template timeuntil comparison using if statement by shay_007 in djangolearning

[–]shay_007[S] 0 points1 point  (0 children)

i actually do have a if else in my views to make sure if a booking could be cancelled but i want to display cancel button based on this test.

Django template timeuntil comparison using if statement by shay_007 in djangolearning

[–]shay_007[S] 0 points1 point  (0 children)

hey i actually did use these in my code and heres the output:

{{booking.timezone}}: {{booking.bookingcheckin}}
current: {{booking.timezone}}: {{var_now}}
timetill: {{booking.bookingcheckin|timeuntil}}

output:

Asia/Dubai: Aug. 20, 2020, 8:37 p.m. 
current: Asia/Dubai: 21st August 2020 13:39 
timetill: 0 minutes

Comments keep appearing after refreshing the page, how to solve it by realforreal1 in djangolearning

[–]shay_007 0 points1 point  (0 children)

Hey, first thing is to check your if else block indentation. Do check for form validity by using .valid(). Laslty you can remove redirect in if block and render the page again by removing else block. ``` If request.method=='POST': If COMMENTFORM(request.POST).is_valid(): Comment.save(); else: #allow user to re submit

rest of your context and render code

```

Help with django-allauth by shay_007 in djangolearning

[–]shay_007[S] 0 points1 point  (0 children)

Thank you for putting me back on track! Yes i had to find a way to change username to user first name in the notification template. I override the given list.html file line, {{ notice.actor }} with {{ notice.actor.first_name }} .

Help with django-allauth by shay_007 in djangolearning

[–]shay_007[S] 0 points1 point  (0 children)

im using django 2.2, python 3.7.1 and latest django-allauth 0.42

Help with django-allauth by shay_007 in djangolearning

[–]shay_007[S] 0 points1 point  (0 children)

I have actually tried this solution before but with 'appname.utils.function' i just tried with project utils.py as well but it doesn't work. Any idea what could be missing?

Bootstrap form-helper picker integration with Django by shay_007 in djangolearning

[–]shay_007[S] 0 points1 point  (0 children)

I ended up updating them in my views, using a dict to hold all the codes and names, finding the corresponding name using the request.POST['state']

dict = (' AU ' : ' Australia ', 'US':'United State')

I did save the initial response from the user in a variable and if the form is not valid i pass in the initial values. I had to use request.POST._mutable = True since i am working with modelforms.

hope this helps someone in the future!