[Solved]-Is it possible to query state of a celery tasks using django-celery-results during the execution of a task?

5👍 ✅ After reviewing the source code of django-celery-result it turns out the code is pretty simple and straight-forward. In order to use django-celery-result to store tasks after the task function is called use the following: from django_celery_results.models import TaskResult import json @shared_task(bind=True) def foo(self, count): print(‘hello’) task_result = TaskResult.objects.get(self.request.id) counter = 1 interval = … Read more

[Solved]-"Django-insecure" in secret key in settings.py in django

5👍 ✅ Why is the key insecure, when auto-created? Seems to be much safer than a key thought of by a human. It is generated using a well known process from a source of entropy whose quality and security cannot be guaranteed (by Django). This is the ostensible reason for this; see https://docs.djangoproject.com/en/3.2/ref/checks/#security security.W009: Your … Read more

[Solved]-There are incompatible versions in the resolved dependencies

5👍 ✅ You somehow managed to install beta versions (used the –pre flag before then deleted the option from Pipfile, for example or used pip directly in the virtual env). Now, because django-graphql-jwt doesn’t conform to semantic versioning, they decided to depend on a major version, pre-release in a patch release ¯\_(ツ)_/¯ . Since the … Read more

[Solved]-Celery No hostname was supplied. Reverting to default 'localhost'

5👍 Full document in this link. you should just add the below line to __init__.py near settings.py from .celery import app as celery_app __all__ = [‘celery_app’] project structure – proj/ – manage.py – proj/ – __init__.py – settings.py – urls.py 👤rmaleki How to create custom CSS "on the fly" based on account settings in a … Read more

[Solved]-How to create custom CSS "on the fly" based on account settings in a Django site?

3👍 ✅ I’ve used option #2 with success. There are 2 decent ways of updating the generated static files that I know of: Use a version querystring like /special_path.css?v=11452354234 where the v parameter is generated from a database field, key in memcached, or some other persistent file. Version gets updated by admin, or for development … Read more