Skip to content
Advertisement

Tag: django

in Celery/Django : cannot find reference ‘control’ in celery.task.control

I’m trying to use celery in my project. when I use from celery.task.control import revoke the PyCharm highlight control and warn me cannot find reference ‘control’ in __init__.py and also PyCharm adds broken line under revoke and warn me Unresolved reference revoke. But when I run the project, celery is working great without any problem with calling tasks or revoking

Install needed libraries for Weasyprint on pipenv (Windows environment)

In order to start generating documents with Weasyprint I installed it on my Windows machine following these instructions: https://weasyprint.readthedocs.io/en/stable/install.html#step-5-run-weasyprint On my computer it works but I have a Django project where I want to integrate this library and I use pipenv. How to install the necessary libraries even in the virtual environment? I tried setting the path for the pycairo

Can’t fix “zipimport.ZipImportError: can’t decompress data; zlib not available” when I type in “python3.6 get-pip.py”

I was trying to install Django. Turns out that course’s teacher said that we will be working with Python 3.6 I install Python 3.6. Now it’s my default, it somewhat replaced the last version I had; which is Python 3.5. Everything ok until that. But when I want to install Django doing “pip3 install django”, it tells me that the

How to get QuerySet values separately?

How I can to get values from QuerySet separately? The result of my QuerySet now is <QuertSet[<value: 5>, <value:90>]> How I can get 5, 90 to separate variable ? Answer There are many ways you can acheive it. For example: or using values_list(): If you want the first two values of a queryset, then do this:

Advertisement