Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Get a single string attribute from my user's extended model
i think my question it's simple, but i'm new and i cannot figure it out. I have a user default Django model and my extended user model, and in my views.py i just want to get my logged user's address like a single string, i have been trying with different ways using (UserProfile.objects.values/filter/get etc...) but i just get errors. Thank you for your time! Models.py class UserProfile(models.Model): user = models.OneToOneField(User, null=True, on_delete=models.CASCADE) profile_pic = models.ImageField(null=True, blank=True, upload_to="profile_imgs") address = models.CharField(null=True, blank=True, max_length=150) curp = models.CharField(null=True, blank=True, max_length=18) Views.py @login_required(login_url='log') def test(request): address = "answer" context = { 'address': address, } return render(request, "test.html", context) -
How do I get Django to save Twilio Voice DTMF input to db.sqlite3?
I'm building an IVR using Python (3.9.5) Django (3.2.8) and Twilio Python Helper Library (7.1.0). My views.py contains multiple views which use Twilio's Gather verb to collect digits. How do I save this info to db.sqlite3? Example: models.py class Survey(models.Model): question1 = models.CharField(max_length=2) question2 = models.CharField(max_length=2) question3 = models.CharField(max_length=2) caller_id = models.CharField(max_length=12) date_time = models.DateTimeField(auto_now_add=True) Example: views.py def question1(): response = VoiceResponse() gather = Gather(input='dtmf') gather.say('How many cars do you own?') response.redirect('../question2') print(response) def question2(): response = VoiceResponse() gather = Gather(input='dtmf') gather.say('How many homes do you own?') response.redirect('../question3') print(response) def question3(): response = VoiceResponse() gather = Gather(input='dtmf') gather.say('How many boats do you own?') response.redirect('../end') print(response) def end(): response = VoiceResponse() response.say('One moment please.') response.pause(length=1) response.say('Thank you. Your input has been saved.') response.hangup() print(response) How do I save the collected digits to the appropriate fields specified in models.py? I only want to save the data once all 3 questions have been answered. If a caller hangs up before answering all 3 questions then I don't want to save anything. How do I save the caller id and date time to the appropiate fileds specified in models.py? I want this info to be displayed in the admin panel. Please help and thanks … -
How to provide context to django class view get method
I have a class based view which I want supply some context to but I don't know how I can achieve this Below is the views.py class Dashboard(LoginRequiredMixin, View): def get(self, request): if request.user is not None and len(request.user.payment_set.all()): if request.user.is_active and request.user.payment_set.first().active: print(eligible_to_review(self.request)) return render(request, 'main.html') else: return redirect('home') else: return redirect('membership') How can I pass a context to this view in order to use it in the html file -
PYODBC Multiple cursors
I hope you're ok Im writing a django app on py3.9.1 and want to execute multiple cursors on mssql server. Here is my connection to mssql database conn = pypyodbc.connect("....") cursor = conn.cursor() cursor1 = conn.cursor() Here is my views.py @login_required(login_url="user:login") @allowed_users(allowed_permissions=["Management Perm","Boss Perm","Account Perm"]) def bills(request): keyword = request.GET.get("keyword") header = "Faturalar | Mavis Development" company = UserCompany.objects.filter(user = request.user).values_list("company__company",flat=True)[0] role = request.user.groups.all()[0].name if keyword: bills_for_acc = cursor.execute("Select * From bills where mancheck = 0 and acccheck = 0 and company = ? and title = ? order by created_date",(company,keyword,)) bills_for_man = cursor1.execute("Select * From bills where mancheck = 0 and acccheck = 1 and company = ? and title = ? order by last_checked_date",(company,keyword)) content = { "bills_for_man":bills_for_man, "bills_for_acc":bills_for_acc, "header":header, "role":role, } return render(request,"bills.html",content) bills_for_acc = cursor.execute("Select * From bills where (acccheck = 0 and mancheck = 0) and company = ? order by created_date",(company,)) bills_for_man = cursor1.execute("Select * From bills where (mancheck = 0 and acccheck = 1) and company = ? order by last_checked_date",(company,)) content = { "bills_for_man":bills_for_man, "bills_for_acc":bills_for_acc, "header":header, "role":role, } return render(request,"bills.html",content) When I trying to show bills.html i get '('HY000', '[HY000] [Microsoft][ODBC SQL Server Driver]'Connection is busy with results for another hstmt.') On … -
How to add additional field in Django Rest Framework for a model that is a foreign key on another model
I am looking to list out all of the teachers in a certain department in Django rest framework and am unsure of how to do so. I believe this would be done by adding a field to the Department serializer but I am not sure. Is there an easy way of how this can be done. models.py class Department(models.Model): name = models.CharField(max_length=300) def __str__(self): return self.name class Teacher(models.Model): name = models.CharField(max_length=300) department = models.ForeignKey(Department, on_delete=models.CASCADE) tenure = models.BooleanField() serializers.py class DepartmentSerializer(serializers.HyperlinkedModelSerializer): #What I believe the serializer field would look like to list teachers connected #with a department teacher = serializers.DjangoModelField( Teacher.objects.filter(department=self.department)) class Meta: model = Department fields = ['url', 'name', 'teacher'] urls.py router = DefaultRouter() router.register(r'teachers', TeacherViewSet) router.register(r'departments', DepartmentViewSet) router.register(r'users', UserViewSet) urlpatterns = [ path('api/', include(router.urls)), ] views.py class TeacherViewSet(viewsets.ModelViewSet): queryset = Teacher.objects.all() serializer_class = TeacherSerializer permission_classes = [permissions.IsAuthenticatedOrReadOnly] class DepartmentViewSet(viewsets.ModelViewSet): queryset = Department.objects.all() serializer_class = DepartmentSerializer permission_classes = [permissions.IsAuthenticatedOrReadOnly] -
OpenLDAP docker Osixia - can not authenticate
I've just tried to configure docker-compose.yml file according to YTB video and github, but with any result. version: "2" services: web: # the application's web service (container) will use an image based on our Dockerfile build: "." # map the internal port 80 to port 8000 on the host ports: - "8000:80" # map the host directory to app (which allows us to see and edit files inside the container) volumes: - ".:/app:rw" - "./data:/data:rw" # the default command to run whenever the container is launched # command: python manage.py runserver 0.0.0.0:80 # the URL 'postgres' or 'mysql' will point to the application's db service links: - "database_default" env_file: .env-local database_default: # Select one of the following db configurations for the database image: postgres:9.6-alpine environment: POSTGRES_DB: "db" POSTGRES_HOST_AUTH_METHOD: "trust" SERVICE_MANAGER: "fsm-postgres" volumes: - ".:/app:rw" openldap_service: image: osixia/openldap:1.1.8 ports: - "636:636" volumes: - ".:/data:rw" environment: - LDAP_ORGANISATION=ramhlocal - LDAP_DOMAIN=ramhlocal.com - LDAP_ADMIN_USERNAME=admin - LDAP_ADMIN_PASSWORD=admin_pass - LDAP_CONFIG_PASSWORD=config_pass - "LDAP_BASE_DN=dc=ramhlocal,dc=com" - LDAP_TLS_CRT_FILENAME=server.crt - LDAP_TLS_KEY_FILENAME=server.key - LDAP_TLS_CA_CRT_FILENAME=ramhlocal.com.ca.crt - LDAP_READONLY_USER=true - LDAP_READONLY_USER_USERNAME=user-ro - LDAP_READONLY_USER_PASSWORD=ro_pass phpldapadmin-service: image: osixia/phpldapadmin:0.9.0 environment: - PHPLDAPADMIN_LDAP_HOSTS=127.0.0.1 ports: - "6443:443" volumes: - ".:/data:rw" I can go to the phpldapadmin, but it shows this:enter image description here Would you know, where is the problem? … -
Django & microservices - How can I design microservices in django
I'm learning Microservices and there s requirement to develop like a Amazon filter and there are other filter as well.How could I able to do it with microservices. UI Design specifically has the filters on the right whenever the user select the filter the particular element containing row should be displayed on the right side of the table. For designing the microservices can I take the all data which is provided in microservices and filter in another microservices. I just stuck with the filter part how can I design with django it supposed to be done from the front side ? Or can it be designed through microservices. I design only the api with the microservices or do I make back end functionality for that.i have major doubt if I design only the api how could I call in django template? Is microservices only creating an api.for instance there is an django project where user can like and comment on the post. In like where users can like the post and comment project where user can comment on the post. And both are dockerised as well.Both connected through microservices in order to get a like and comment together in the … -
Deploying Django app : Forbidden You don't have permission to access this resource
I was deploying my django app on my VPS using the apache web server. It works totally fine on http://192.46.209.82:8000/ but when I try to access the same using my IP address, 192.46.209.82. I get Forbidden You don't have permission to access this resource. Apache/2.4.41 (Ubuntu) Server at 192.46.209.82 Port 80 Here is my conf file nano /etc/apache2/sites-available/000-default.conf <VirtualHost *:80> ServerAdmin webmaster@example.com DocumentRoot /root/django/myproject ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /static /root/django/myproject/static <Directory /root/django/myproject/static> Require all granted </Directory> <Directory /root/django/myproject/myproject> <Files wsgi.py> Require all granted </Files> </Directory> WSGIDaemonProcess myproject python-path=/root/django/myproject python-home=/root/django/myprojectenv WSGIProcessGroup myproject WSGIScriptAlias / /root/django/myproject/myproject/wsgi.py </VirtualHost> I am using python's virtual environment, where myprojectenv is my virtual env path and the pwd is /root/django Note : I tried the answer from the question that I was getting as suggestion to this question but that did not work for me. -
How do I install Python web project on Centos
I have created a Python web application using VS2022 (Django Web Project type). It is working as I expect using local url access - executing from VS2022. However, how do I proceed to implementing this as an operating web site on a server. I have a Centos 8 server with complete root control. With simple html pages I can upload this then enter my URL in a browser and all ok. Can anyone give me the broad details of how to achieve the same thing with my Python code. I know I have to install pip, Python (3 in this case) and Django but beyond that I am not sure how to proceed. Apologies as this is such a broad question, I just need some pointers or tutorial type links. thanks in advance -
Django api requests not working on AWS elastic beanstalk
I've created a django application and deployed it using aws elastic beanstalk. The GET requests to fetch the static files are working fine. But any other requests made directed to the django app specifically, is timing out. Here is the commands in .ebextensions folder 01_packages.config packages: yum: postgresql-devel: [] django.config option_settings: "aws:elasticbeanstalk:application:environment": DJANGO_SETTINGS_MODULE: "app_server.settings" "PYTHONPATH": "/var/app/current:$PYTHONPATH" "aws:elasticbeanstalk:container:python": WSGIPath: app_server.wsgi:application NumProcesses: 3 NumThreads: 20 aws:elasticbeanstalk:environment:proxy:staticfiles: /static/: "staticfiles/" These are installed apps and middleware settings in settings.py file INSTALLED_APPS = [ 'insta_backend.apps.InstaBackendConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'corsheaders', 'storages' ] MIDDLEWARE = [ # 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', # 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', # 'corsheaders.middleware.CorsMiddleware', # "whitenoise.middleware.WhiteNoiseMiddleware", 'django.middleware.common.CommonMiddleware', ] The routes of the django app work fine locally. But when deployed using EB, the requests are timing out or cancelled. The preflight request made here times out. Following is the screenshot of the network requests from chrome dev tools -
In Django, how to bind the dropdown list with data from another table using foreign key?
model.py class LabTable(models.Model): LabNo = models.AutoField(primary_key=True) Pid = models.IntegerField() Weight = models.IntegerField() DoctorId = models.ForeignKey(DoctorTable,on_delete=models.CASCADE) Date = models.DateField() Category = models.CharField(max_length=50) PatientType = models.CharField(max_length=50) Amount = models.IntegerField() 1.Here, I have created the lab model and a foreign key with doctor table. I want to use doctor table to present data in dropdown. -
upload multiple images with django formset and ajax request
I'm trying to upload multiple images with django formset and through ajax request . i know i have to use formData.append("name",document.getElementById("img_1_id").files[0]); but i dont know how to do it for several image fields ? is there something to fix it please ? i dont want to use several input files statically , i want to implement it dynamically , so i have used model formset factory , class Document(models.Model): booking =models.ForeignKey(Booking,on_delete=models.PROTECT) docs = models.ImageField(upload_to=upload_docs) def __str__(self): return str(self.booking.id) and here is my forms.py class UploadDocumentsForm(forms.ModelForm): class Meta: model = Document fields = ['docs'] UploadDocumentFormSet = modelformset_factory(Document,form=UploadDocumentsForm,extra=1,can_delete=True) and here is my views.py @login_required def add_new_image(request,id): obj = get_object_or_404(Booking,id=id) if request.is_ajax() and request.method == 'POST': images = UploadDocumentFormSet(request.POST,request.FILES) if images.is_valid(): for img in images: if img.is_valid() and img.cleaned_data !={}: img_post = img.save(commit=False) img_post.booking = obj img_post.save() return redirect(reverse_lazy("booking:add_booking",kwargs={"room_no":obj.room_no.room_no})) else: messages.error(request,_('choose right image ..')) images = UploadDocumentFormSet(queryset=Document.objects.none()) return render(request,'booking/add_img.html',{'obj':obj,'images':images}) and here is my templates $('#addButton').click(function() { var form_dex1 = $('#id_form-TOTAL_FORMS').val(); $('#images').append($('#formset').html().replace(/__prefix__/g,form_dex1)); $('#id_form-TOTAL_FORMS').val(parseInt(form_dex1) + 1); }); <button id="addButton" class="px-4 py-1 pb-2 text-white focus:outline-none header rounded-xl"> {% trans "add new image" %} </button> <div class="flex flex-wrap justify-between "> <div class="text-lg w-full border p-3 border-purple-900 rounded-lg"> <form action="" method="POST" enctype="multipart/form-data" dir="ltr">{% csrf_token %} {% for form … -
Invalid boundary in multipart: None Django Rest API
I am using function based api views on django to handle an image upload initiated through react (axios). The frontend work works but I am having a problem in django views. Invalid boundary in multipart: None This is my code @api_view(['get', 'post']) @parser_classes([MultiPartParser]) def HandleUpload(request): .... if request.method == 'POST': image = request.data.get('image') instance.image = image instance.save() I am even using the parser_classes to allow MultiPartParser in this case. Why is it not possible to get the file from request.data.get? I tried even with request.FILES but still I had the same problem. I have searched online for 2 day but none offer a suitable solution to this particular problem as most are using class based views or using form serializers to upload images. Is it possible to upload images in function based api views after all? Can anyone help me understand the problem? -
How do I display Images in React from a Django Rest API?
I want to send my images from the django media folder to my react front end. And the view I build works when I go to the Url 'api/id/1' the image gets displayed but when I want to open it in my react app under loacalhost:8000 the image is not being displayed the view class PNGRenderer(renderers.BaseRenderer): media_type = 'image/png' format = 'png' charset = None render_style = 'binary' def render(self, data, media_type=None, renderer_context=None): return data class ImageAPIView(generics.RetrieveAPIView): queryset = Images.objects.filter(id=1) renderer_classes = [PNGRenderer] def get(self, request, *args, **kwargs): renderer_classes = [PNGRenderer] queryset = Images.objects.get(id=self.kwargs['id']).image data = queryset return Response(data, content_type='image/png') the API call export function apiImage(image,callback) { const endpoint = `id/${image}` backendlookup('GET', endpoint ,callback) } function App() { const classes = useStyles() const handleLookup = (response, status) => { if (status === 200) { console.log(response) } } const [img, setImg]=useState(apiImage(2,handleLookup)) const ImgChange =(e) =>{ if(e === 'laugh'){ setImg(Trainer_Laugh) } if(e === 'smile'){ setImg(Trainer_Smile) } } return ( <Grid container display="flex" direction="column" justifyContent="center" alignItems="center" className={classes.grid}> <img src={img} alt='girl' className={classes.img}/> <Paper className={classes.paper} > <Textfield handleWaifuChange={ImgChange}/> </Paper> </Grid> ); } export default App; -
django terminal error zsh: command not found
zsh: command not found: virtualenv I am following youtube but cannot follow that. cd desktop/ecom virtualenv ecomenv cd ecomenv source bin/activate cd .. pip install django .... -
Makemigrations and migrate in Django
I have a problem in the Django For example: In Definition of models. i have : class Social_Network(models.Model): Name = models.TextField(null=False) Addresses = models.TextField(null=False) And after running python manage.py makemigrations python manage.py migrate Until this part everything its ok My problem is starting now. When i want to change (Social_Network) models. class Social_Network(models.Model): Id = models.TextField(null=False) Name = models.TextField(null=False) Addresses = models.TextField(null=False) I inserted 'Id' to 'social network' models And after running python manage.py makemigrations python manage.py migrate I encounter the following error Please Help me -
Image not getting resized Django models
I have a model Project where I am taking one Image as input from the admin/ panel and storing that uploaded image into folder "media/thumbnail" and I wanted to resize the image to a particular size once that image is uploaded. So I tried overriding.save() method : In model.py , class Project(models.Model): title = models.CharField(max_length=50) description = models.CharField(max_length=500) link = models.CharField(max_length=500) thumbnail = models.ImageField( default="default.png", upload_to="thumbnails/") def __str__(self): return self.title def save(self): super().save() img = Image.open(self.thumbnail.path) if img.height > 300 or img.width > 300: output_size = (300, 300) img.thumbnail(output_size) img.save(self.thumbnail.path) In views.py, def projects(request): context = { "Projects": Project.objects.all() } return render(request, 'website/projects.html', context=context) In projects.html, {% extends 'website\base.html' %} {% load static %} {% block title %} P.Ghugare | Projects {% endblock title %} {% block heading %} Projects {% endblock heading %} {% block content %} <div class="container"> <div class="row"> {% for project in Projects %} <div class="col-sm-6 col-md-4" style="padding: 10px;"> <img class="card-img-top" src="{{ project.thumbnail.url}}" alt="Card image cap"> <div class="card p-3"> <div class="card-block"> <h3 class="card-title">{{ project.title }}</h3> <p class="card-text"> {{ project.description }} </p> <a class="btn btn-purple-reverse pill" href="{{ project.link }}" >Code</a> </div> </div> </div> {% endfor %} </div> </div> {% endblock content %} But images are not getting … -
Nginx not serving static files even with suggested config
I've seen this question being asked loads of time here but unfortunatelly none of the answers worked. Basically my site is in Django with Gunicorn and Nginx. The Django part (dynamic stuff) is working fine but nginx can't find the static files. Static files located in: $ ls -l total 4 drwxrwxr-x 5 django www-data 4096 Oct 19 13:26 findings My settings.py: STATIC_URL = '/static/' STATIC_ROOT = '/home/django/static/findings/' My nginx config: server { listen 80; location = /favicon.ico { access_log off; log_not_found off; } location = /static { autoindex on; alias /home/django/static/findings; } location / { include proxy_params; proxy_pass http://unix:/home/django/findings-app/run/findings.sock; } } In my live website, the static urls get suitably translated in the html source code as: http://<IP>/static/findings/styles/base.css For some reason I just cannot seem to get the syntax right and nginx just doesn't seem to find any of my static files. Thanks for the help! -
Django cast string to Integer
I'm trying to cast a value from my template to the views with this code: <form action="{% url 'view_passwordgenerator' %}"> <select name="length"> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12" selected="selected">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> </select> Length <input type="submit" value="Generate Password" class="btn btn-primary"> </form>``` views def view_passwordgenerator(request): length = int(request.GET.get('length')) for i in range(length): ... return render(request, 'home/passwordgenerator.html') This error appears: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' im just looking for a way to get the int out of the template without this error, maybe there is another way to cast it. -
How to hide the Button in Django with help of JavaScript and CSS?
I have set a Boolean Model in the Django Admin panel with the Name of CouponButtonDisplay The Full Line is Like this CouponButtonDisplay = models.BooleanField(default=True) Now i want to hide a button when it is False The Code for Button is <div class="product-count"> <a href="#" class="round-black-btn" onclick="openCouponLinkDetails()" style="color: white !important;" id="getCouponBtnDetails" data-toggle="modal" data-target="#modalCouponDetails">Get Coupon</a> The Code Which I have written in javascript is let CouponButtonDisplay = {{Data.CouponButtonDisplay}}; function CouponButtonDisplay(){ CouponButtonDisplay = !counter; if(CouponButtonDisplay == true){ document.getElementById('getCouponBtnDetails').style.display = 'block'; } if(CouponButtonDisplay == false){ document.getElementById('getCouponBtnDetails').style.display = 'none'; } } This Code is not working anyone can help me as I am a complete newbie in Django -
Compress image in Django before saving to AWS s3 bucket
Can someone please help me how to compress large image before saving to aws s3 in Django ? I have tried thousands logic but nothing worked, when I override save method its saying , 'absolute path not supported' kind of thing, One method worked for me but when I click post , Its gives me error of Unique constrains like post.id, but it saves in the background when I comeback and refresh its shows up with the size reduced image, Can someone please help me how to do that properly with code . This is my post model: class Post(models.Model): postuuid = models.UUIDField(default=uuid.uuid4,unique=True,editable=False) user = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE, null=True) title = models.CharField(max_length=150,blank=False) text = models.TextField(null=True,blank=False) image = models.ImageField(upload_to='post_images/',null=True,blank=True,default="") created_at = models.DateTimeField(auto_now_add=True, null=True) likes = models.ManyToManyField(User, blank=True, related_name="post_like") tag= models.CharField(max_length=150,blank=True) post_url=models.URLField(max_length=150,blank=True) video = models.FileField(upload_to='post_videos/',null=True,blank=True,default="") is_ad = models.BooleanField(default=False) # community = models.ForeignKey(communities,on_delete=models.CASCADE) def __str__(self): return self.title -
How to Implement Role Based Data Restriction In Django?
I'm a newbie to Django. I am working on an Application where data are to be shown to users based on their roles. Example User A Should only see the data created by A. Similarly User B should See only his data. Finally, there is a superuser who can see all data. What is the best way in Django to implement this?. Currently, I am trying with Django ORM Managers. -
Gitlab CI pipeline failure
My gitlab ci pipeline keeps failing. It seems am stuck here. Am actually still new to the CI thing so I don't know what am doing wrong. Any help will be appreciated Below is .gitlab-ci.yml file image: python:latest services: - postgres:latest variables: POSTGRES_DB: projectdb # This folder is cached between builds # http://docs.gitlab.com/ee/ci/yaml/README.html#cache cache: paths: - ~/.cache/pip/ before_script: - python -V build: stage: build script: - pip install -r requirements.txt - python manage.py migrate only: - EC-30 -
How to test Meta tags for Images in a Django Project on local host
I have a Django Project and I am trying to add Meta Tags for an Image and Test them in the Local Host before going for the public Website. In the base.html I have added the following: <meta property="og:title" name="description" content="{% block description %}{% endblock %}"> <meta property="og:type" content="website" > <meta property="og:image" content="{% block image %}{% endblock %}"> In the home.html I have add the following: {% block description %}{{ info.description }}{% endblock %} {% block image %}{{ info.avatar.url }}{% endblock %} My question is: How do I test it before going production because on the local host I can see the path of the {{ info.avatar.url }} on the top of the page. -
ModuleNotFoundError: No module named 'django.config' using celery and rabbitmq
I'm getting this error after running the following command: C:\Users\callu\project_name>celery -A project_name worker -l info I'm wondering if it has something to do with the fact that I've not created my django project in a virtual environment but I can't find anything on the issue. If it was due to it being outside a virtual environment I'm not sure how I'd get around it without restarting the project in one (is it easy to move to a venv in PyCharm?) I run my django server and my above celery command here: C:\Users\callu\project_name> I run start my RabbitMQ server in another location (not venv) but don't think that's the issue Full Traceback: Traceback (most recent call last): File "c:\users\callu\appdata\local\programs\python\python37-32\lib\site-packages\cached_property.py", line 70, in __get__ return obj_dict[name] KeyError: 'data' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\callu\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\callu\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\callu\AppData\Local\Programs\Python\Python37-32\Scripts\celery.exe\__main__.py", line 7, in <module> File "c:\users\callu\appdata\local\programs\python\python37-32\lib\site-packages\celery\__main__.py", line 15, in main sys.exit(_main()) File "c:\users\callu\appdata\local\programs\python\python37-32\lib\site-packages\celery\bin\celery.py", line 213, in main return celery(auto_envvar_prefix="CELERY") File "c:\users\callu\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 764, in __call__ return self.main(*args, **kwargs) File "c:\users\callu\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 717, in main rv = self.invoke(ctx) File "c:\users\callu\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 1135, in …