Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Page not found (404) Request Method: GET trying to click to another .html file
I've done so much research I must have clearly missed something done or something wrong. The server I'm running is localhost:8000 I've added the homepage everything works fine until I try to click on another html file and received Page not found (404) Request Method: GET trying to Using the URLconf defined in user.urls, Django tried these URL patterns, in this order: admin/ secret/ home/ [name='home'] home/ [name='contact'] home/ [name='Project'] ^static/(?P<path>.*)$ index/Project.html. Here's the root urls.py: from django.contrib import admin from django.urls import path, include from django.conf.urls import url from django.conf import settings from django.conf.urls.static import static from django.views.generic import RedirectView from portfolio_django import views admin.autodiscover() urlpatterns = [ path('admin/', include('admin_honeypot.urls', namespace='admin_honeypot')), url('secret/', admin.site.urls), path('home/', include("portfolio_django.urls")), ]+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) from django.urls import path from portfolio_django import views urlpatterns = [ path('', views.home, name='home'), path('', views.contact, name='contact'), path('', views.Project, name='Project') views.py from django.shortcuts import render # Create your views here. def home(request): return render(request, 'home.html') def Portfolio(request): return render(request, 'Project.html') def contact(request): return render(request, 'contact.html') -
How to perform multiple count analytics using django?
I have an analytics dashboard - basically it shows the overview of the data's. Lets say that we have a table named "Records" In my analytics dashboard, i need to show various details about the records of particular user: user = Records.objects.filter(id=pk) By this we get all the records associate with the user, now to show various analytics like as follows, Total Records, Total Records by Today Total Records by Week Total Records by Month Total Active Records // Records which has status == active Total InActive Records // Records which has status == inactive How to do all these ? While researching i found few options to follow, Option 1 : Do separate query for each of the need Option 2 : Do fetch all the data's and perform the above calculations in view and send as context How to deal with these ? Am also planning to use charts -
generate a qr code and when scanned display url data in django
here when an item is added when need to automatically generate the qrcode and when scan with our mobile camera it need to show the url data Python version = 2.7 Django version = 1.8 qrcode version = 6.0 lets us consider my models.py as def qr_code_file_name(instance, filename): return '%s/qr_codes/%s/' % (instance.client_id, filename) class StockItems(models.Model): item_name = models.CharField(max_length=512) qr_code = models.ImageField(upload_to=qr_code_file_name, blank=True, null=True) def __unicode__(self): return self.item_name def save(self, *args, **kwargs): qrcode_img = qrcode.make(self.item_name) canvas = Image.new('RGB',(90,90),'white') draw = ImageDraw.Draw(canvas) canvas.paste(qrcode_img) fname = File('qrcode-code1.png') buffer = BytesIO() canvas.save(buffer,'PNG') self.qr_code.save(fname,File(buffer),save=False) canvas.close() When i am trying the save the new item created and the automatically saving the qr_code i am getting an error Here is my traceback of error Traceback (most recent call last): File "/home/andrew/.virtualenvs/projectscan/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/andrew/.virtualenvs/projectscan/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view return view_func(request, *args, **kwargs) File "/home/andrew/.virtualenvs/projectscan/local/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "/home/andrew/devel/projectscan/mcam/server/mcam/core/views.py", line 516, in dispatch return super(CustomAuthMixin, self).dispatch(request, *args, **kwargs) File "/home/andrew/.virtualenvs/projectscan/local/lib/python2.7/site-packages/braces/views/_access.py", line 102, in dispatch request, *args, **kwargs) File "/home/andrew/.virtualenvs/projectscan/local/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch return handler(request, *args, **kwargs) File "/home/andrew/.virtualenvs/projectscan/local/lib/python2.7/site-packages/django/views/generic/edit.py", line 249, in post return super(BaseCreateView, self).post(request, *args, **kwargs) File "/home/andrew/.virtualenvs/projectscan/local/lib/python2.7/site-packages/django/views/generic/edit.py", line 215, in post … -
Is it important to create virtual environment for new project in django-admin?
Is it important to create virtual environment for new project in django-admin -
Django (HTML) - Clickable label in template (not working)
I'm working on a Django project where I would like using some customized checkbox forms when this issue shown up. Both code chunks are exactly the same, but using different forms. The issue comes when the first's sample label is clickable (so I can hide the radio button), but the second one is not working as expected, the user must click on the radio button, if I hide it the whole label becomes useless. NOT WORKING PROPERLY: <form action="" class="form-group" method="POST"> <div class="modal-body"> <div class="row"> <div class="col"> <ul> {% csrf_token %} <fieldset > {% for radio in form_pizzas.producto %} <li style="list-style-type:none"> <span class="radio">{{ radio.tag }} <label class="label" for="{{ radio.id_for_label }}"> {{ radio.choice_label }} </label> </span> </li> {% endfor %} </fieldset> </ul> </div> <div class="col"> {{form_pizzas.cantidad.label}} {{form_pizzas.cantidad}} {{form_pizzas.observaciones.label}} {{form_pizzas.observaciones}} </div> </div> </div> <div class="modal-footer"> <button class="btn btn-light" type="button" data-bs-dismiss="modal">Volver</button> <input type="submit" class="btn btn-primary" value="Agregar" /> </div> WORKING PROPERLY: <form action="" class="form-group" method="POST"> <div class="modal-body"> <div class="row"> <div class="col"> <ul> {% csrf_token %} <fieldset > {% for radio in form_emp.producto %} <li style="list-style-type:none"> <span class="radio">{{ radio.tag }} <label class="label" for="{{ radio.id_for_label }}"> {{ radio.choice_label }} </label> </span> </li> {% endfor %} </fieldset> </ul> </div> <div class="col"> {{form_emp.cantidad.label}} {{form_emp.cantidad}} {{form_emp.observaciones.label}} {{form_emp.observaciones}} </div> </div> … -
I am trying to sorting data in django the data is coming from different table in different dropdown but I am stuck I am not getting perfect match
**basically I am making a search engine for car's selling company in this search engine data is coming from different models but I am not getting the accurate data using these filter how can I get the perfect match I need help to solve this problem I will be very thankfull to you ** home.html <form action="/searchdd" method="POST" id="indexForm" data-cars-url="{% url 'ajax_load_cars' %}"> {% csrf_token %} <div class="col-md-12"> <div class="row"> <div class=" col-md-3"> <label for="" class="white">Make</label> <select id="companyddl" name="companyname" class="searchengine"> <option disabled selected="true" value="">--Select Make--</option> {% for company in companies %} <option value="{{company.CompanyID}}">{{company.CompanyName}}</option> {% endfor %} </select> </div> <div class=" col-md-3"> <label for="" class="white">Model</label> <select id="carddl" name="carname" class="searchengine"> <option disabled selected="true" value="">--Select Model--</option> </select> </div> <div class="col-md-3"> <label for="" class="white">From Year</label> <select name="fromdate" id="fromdate"> <option disabled selected="true" value="">--select Year--</option> {% for manf in manufac %} <option value="{{manf.ManufacturingYMID}}">{{manf.ManufacturingDate}}</option> {% endfor %} </select> </div> <div class="col-md-3"> <label for="" class="white">To Year</label> <select name="todate" id="todate"> <option disabled selected="true" value="">--select Year--</option> {% for manf in manufac %} <option value="{{manf.ManufacturingYMID}}">{{manf.ManufacturingDate}}</option> {% endfor %} </select> </div> </div> </div> <div class="col-md-12"> <div class="row"> <div class="dropdown my-2 col-md-3 col-sm-12"> <label for="" class="white">Type </label> <select name="type" id="type" class="searchengine" style="padding-right: 7px; margin-left: 3px;"> <option disabled selected="true" value="">--Select Type--</option> {% for ty … -
How can i do this via aggregation in django
I have a method in the model that saves the final price in the cart, it looks like this: class Cart(models.Model): """Cart""" owner = models.OneToOneField('Customer', on_delete=models.CASCADE) meals = models.ManyToManyField(CartMeal, related_name='related_cart', blank=True) total_products = models.PositiveIntegerField(default=0) final_price = models.DecimalField(max_digits=9, decimal_places=2, default=0) in_orders = models.BooleanField(default=False) for_anonymous_user = models.BooleanField(default=False) def save(self, *args, **kwargs): if self.id: self.total_products = self.meals.count() self.final_price = sum([cmeals.final_price for cmeals in self.meals.all()]) super().save(*args, **kwargs) I was told that I can make this line self.final_price = sum([cmeals.final_price for cmeals in self.meals.all()]) with a single query using aggregate. How can I do this and where? In the model or do I need to do this in the view? Thanks. -
Django Unable to test API patch method with query parameters other than pk MultiValueDictKeyError
I have an APIView implementing patch for an entity (lets say money). I can send a request from axios and the money gets updated but I cannot make the test to work. The request.query_params are empty when I send them via self.client.patch inside the test case. Then it throuws MultiValueDictKeyError('money_code') Here is the code: class UpdateMoneyQuantity(APIView): def patch(self, request): try: money_code = request.query_params["money_code"] money_object = Money.objects.get(money_code=money_code) # set partial=True to update a data partially serializer = MoneySerializer( money_object, data=request.data, partial=True ) if serializer.is_valid(): serializer.save() return Response(data=serializer.data, status=HTTP_200_OK) return Response(data=serializer.errors, status=HTTP_400_BAD_REQUEST) except Money.DoesNotExist as err: return Response( data={ "error": "Unable to find the desired code." }, status=HTTP_400_BAD_REQUEST, ) except Exception as err: logger.exception( f"Unable to perform patch on money quantity. \n Exception: {str(err)}" ) return Response(data=str(err), status=HTTP_500_INTERNAL_SERVER_ERROR) Here is the url: path( "update-money-quantity/", UpdateMoneyQuantity.as_view(), name="update-money-quantity", ), Here is the test case I am trying to write but couldn't make it work. class MoneyUpdateTest(APITestCase): def test_update_quantity(self): """ Ensure we can update the quantity. """ obj = Money.objects.create( money_code="RG100TEST1", supplier="Test supplier", ) params = {"money_code": "RG100TEST1"} url = reverse("update-money-quantity") data = { "saving": 110, "actual_saving": 105, } response = self.client.patch(url, data=data, query_params=params) self.assertEqual(response.status_code, HTTP_200_OK) self.assertEqual( Money.objects.get(money_code="RG100TEST1").saving, 110 ) self.assertEqual( Money.objects.get(money_code="RG100TEST1").actual_saving, 105 ) -
HTML files are not recognised in Django project
I am learning Django, everything was working fine but there was no syntax highlighting for django commands like {% block body_block %} {% endblock %} and so on... So, i installed a vscode extensions Django by Baptiste Darthenay and Django by Roberth Solis, now syntax highlighting is working but HTML files are not recognised Link. There is no code completion, everything has to be typed word by word. Disabling these extensions is working well, but then there is not syntax highlightling. Please Help!! -
Cannot query "": Must be "User" instance in Django 3.2
I get this error from below view: from django.shortcuts import render, redirect from movies import models as movies_models from django.contrib.auth import get_user_model User = get_user_model() def playlists_view(request): if (not request.user.is_authenticated) or (not request.user.is_staff): return redirect('Login') playlists = movies_models.PlayList.objects.filter(created_by=request.user).order_by('-id') return render(request, 'cpanel/playlists.html', {'playlists': playlists}) My playlist model is this: from django.db import models class PlayList(models.Model): type = models.PositiveSmallIntegerField(choices=type_choice, default=1, verbose_name='نوع فیلم') category = models.ManyToManyField(Category, related_name='Playlists', verbose_name='دسته بندی و ژانر') name_en = models.CharField(max_length=55, unique=True, verbose_name='نام انگلیسی') name_fa = models.CharField(max_length=55, unique=True, verbose_name='نام فارسی') summary = models.TextField(max_length=1024, verbose_name='خلاصه فیلم') imdb_score = models.FloatField(default=0, verbose_name='IMDB امتیاز') users_score = models.FloatField(default=0, verbose_name='امتیاز کاربران') # seen_number = models.FloatField(default=0, verbose_name='تعداد نفراتی که فیلم را مشاهده کرده اند') publish_status = models.CharField(max_length=55, null=True, blank=True) is_free = models.BooleanField(default=False, verbose_name='رایگان است') visit_times = models.IntegerField(default=0) play_times = models.IntegerField(default=0) year = models.CharField(max_length=4, verbose_name='سال') time = models.CharField(max_length=55, verbose_name='مدت زمان فیلم') tv_pg = models.PositiveSmallIntegerField(choices=tv_pg_choice, default=5, verbose_name='درجه بندی سنی') actor = models.ManyToManyField(Actor, blank=True, verbose_name='بازیگران') director = models.ManyToManyField(Director, blank=True, verbose_name='کارگردان') thumb_image = models.ImageField(null=True, blank=True, editable=True, upload_to=image_path, verbose_name='تصویر انگشتی فیلم') image_1920x1080 = models.ImageField(null=True, blank=True, editable=True, upload_to=image_path, verbose_name='تصویر بنر دسکتاپ فیلم') image_600x810 = models.ImageField(null=True, blank=True, editable=True, upload_to=image_path, verbose_name='تصویر بنر موبایل فیلم') country = models.ManyToManyField(Country, verbose_name='کشور') created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(null=True, blank=True) created_by = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True) users_score_n = models.IntegerField(default=0) users_score_p … -
Unable to perform conditional redirect from a class based view Django
I am trying to redirect a user who has already registered to a different view. here is the code for the views.py However when qs.exists() = true I get an error 'The view Lpage.views.homeview didn't return an HttpResponse object. It returned None instead.' I am a beginner have read the documentation but unable to find where i am going worng. Thanks from django.shortcuts import render, redirect from django.views import View from Lpage.forms import SubscriberEntryForm from Lpage.models import Subscriber class homeview(View): def get(self,request): msg = request.session.get('msg', False) if(msg): del(request.session['msg']) return render(request,'Lpage/index.html') def post(self, request): form = SubscriberEntryForm(request.POST or None) if form.is_valid(): obj = form.save(commit=False) qs = Subscriber.objects.filter(email__iexact=obj.email) if qs.exists(): return redirect('messageview') else: obj.save() request.session['msg'] = "msg" return redirect(request.path) def messageview(request): return render(request,'Lpage/messages.html',{}) -
How to does not include default values in calculations in django?
I am working on Django where I have two models Gigs and Orders and I am calculating average Completion time of order of every gig. in order model I have two fields order start time (which I'm sending whenever seller accepts the order) and order completed time (which I'm sending when seller delivered) the order. but the problem is that I can't set these both field default=Null cause I am using it in Gig order and views. so I set them as default=timezone.now. but now I want when I calculate average completion time it should not include that fields which are initialized automatically by default. Models.py class Orders(models.Model): buyer = models.ForeignKey(User,default=None, on_delete=models.CASCADE,related_name='buyer_id') seller = models.ForeignKey(User,default=None, on_delete=models.CASCADE,related_name='seller_id') item = models.ForeignKey(Gigs,default=None, on_delete=models.CASCADE,related_name='gig') payment_method= models.CharField(max_length=10) address = models.CharField(max_length=255) mobile = models.CharField(max_length=13,default=None) quantity = models.SmallIntegerField(default=1) status = models.CharField(max_length=13,default='new order') orderStartTime = models.DateTimeField(default=timezone.now) orderCompletedTime = models.DateTimeField(default=timezone.now) created_at = models.DateTimeField(auto_now_add=True) class Gigs(models.Model): title = models.CharField(max_length=255) category = models.ForeignKey(Categories , on_delete=models.CASCADE) images = models.ImageField(blank=True, null = True, upload_to= upload_path) price = models.DecimalField(max_digits=6, decimal_places=2) details = models.TextField() seller = models.ForeignKey(User,default=None, on_delete=models.CASCADE) @property def average_completionTime(self): if getattr(self, '_average_completionTime', None): return self._average_completionTime return self.gig.aggregate(Avg(F('orderCompletedTime') - F('orderStartTime'))) Views.py class RetrieveGigsAPI(GenericAPIView, RetrieveModelMixin): def get_queryset(self): return Gigs.objects.annotate( _average_completionTime=Avg( ExpressionWrapper(F('gig__orderCompletedTime') - F('gig__orderStartTime'), output_field=DurationField()) ) … -
How can i pass an form instance to another form while both are saving Django?
Info: I have a python Django web app where users are allowed to create articles. Each article has multiple files(photos/videos) that are associated with that article. I have three model TemporaryUpload(1), TemporaryUploadChunked(2) and StoredUpload(2). Everything is working fine. first Data is asynchronously uploaded to TemporaryUpload before submitting the form. after hit form submit button data stored into StoredUpload table. This is working perfectly for me! Now What i want to do: When the user hit submit button article is create and files are linked with the article Which files are submited by user into StoredUpload. how can i associate these file with article when user hit submit button? What I have so far: i have ArticleModel/ArticleForm. when the user hit submit button The article created and the files are appended into StoreUpload table it's working fine. But the files are not linked it with an article. i want to link the files with artcle. models.py class TemporaryUpload(models.Model): FILE_DATA = "F" URL = "U" UPLOAD_TYPE_CHOICES = ( (FILE_DATA, "Uploaded file data"), (URL, "Remote file URL"), ) upload_id = models.CharField( primary_key=True, max_length=22, validators=[MinLengthValidator(22)] ) file_id = models.CharField(max_length=22, validators=[MinLengthValidator(22)]) file = models.FileField(storage=storage, upload_to=get_upload_path) upload_name = models.CharField(max_length=512) uploaded = models.DateTimeField(auto_now_add=True) upload_type = models.CharField(max_length=1, choices=UPLOAD_TYPE_CHOICES) … -
I am developing library management system in Django I don't know how should I store the data?Please reply [closed]
I am developing library management system in Django, I didn't want to host the website online ***Now how should I store the data of the website if I didn't host the website I am using a database but how will the librarian run the website as he doesn't know how to run commands like "python manage.py runserver" *** As there any way so that I can create the website for library without hosting online and run the website easily -
How to execute tasks sequentially in celery based on a parameter?
I am currently working on a data polling app in which we have some 600-700 different data sources. We have a client installed at every source location which periodically collects data and sends a CSV file to the server. At server, we receive the CSV and process the data later using celery tasks. We have currently 10 celery workers running on the server which handle one file each simultaneously. Although, we do want this concurrency yet we would also like to implement celery in such a way data files from one source should always be processed sequentially. That means, if the files are from same data source 2nd file should always be processed only after 1st file is completely processed. Does celery provide such an option or I need to build some custom queue management solution? Note: I am currently using Celery with Django. -
Deploying React - django apps on Azure web apps
Locally, I am able to run my django app and react app. I migrated the django app to the azure web apps. My question is, what is best practice regarding connecting the react app to the django app. Should I start another web app instance, or should I try to run both on the same instance? -
Usage of Django models
[This is the django admin page][1] [This is the error that came][2] [Django code][3] Hello, i tried to create products in the admin side of django server using models, i put the picture of what i typed and what error i got , can u help?This is the code i typed in models.py # Create your models here. class Product(models.Model): Name = models.CharField(default='This product is not nameless', max_length=100) price = models.DecimalField(decimal_places=2,max_digits=100) description = models.TextField(default='Hello!') summmary = models.TextField(default='Access level is low') ``` [1]: https://i.stack.imgur.com/P6zcT.png [2]: https://i.stack.imgur.com/hXnDw.png [3]: https://i.stack.imgur.com/bjNNB.png -
Python: Access second parent's instance attribute
I have class which inherits from 2 classes, but in child class instance I cant access second parent's instance attribute, here is my code example class Parent1: def __init__(self): self.a = 'a' class Parent2: def __init__(self): self.b = 'b' class Child(Parent1, Parent2): pass instance = Child() print(instance.a) print(instance.b) # here is error is there actually clean way around?. P.S: What i am actually doing is in django. In views I want to put extra parent class which will add some attributes to the view class instance class ContextMixin: def __init__(self): self.context = { 'data': None, 'message': None } # and in all/some views do like that class LoginView(APIView, ContextMixin): def post(self, request): # use self.context instead of creating each time pass -
How to get the value of a hidden input field in a Django view?
I have a form which has a hidden field like below: <form id = "subscribe" form method = 'POST'> {% csrf_token %} <textarea id = "first_name" type = "text" name = "first_name" rows="3"></textarea> <input id="page_url" name="page_url" value={{ request.build_absolute_uri }}{{ object.get_absolute_url }}> <button type="submit" value = "Subscribe" id = "email_submit">Send</button> </div> </form> I am trying to get the value of the hidden field. Specifically, what I want is the URL of the current webpage. My view function looks like this: def subscribe(request): if request.method == 'POST': firstname = request.POST.get('first_name') pageurl = request.POST.get('page_url') print('page url', pageurl) return HttpResponse("/") As you can see I am trying to get the URL via request.POST.get('page_url') but all I am getting is a None value. I need to get the value of {{ request.build_absolute_uri }}{{ object.get_absolute_url }} instead. -
Docker/Django - How to make sure that all migrations are completed bofor application start?
at my dockerized Django application I have the following bash function at my docker-entrypoint.sh. This basically only checks if the database is available: function check_mariadb { while ! mysqladmin --user=$MYSQL_USER --password=$MYSQL_PASSWORD --host $MYSQL_HOST ping --silent &> /dev/null; do echo "Waiting for MariaDB service to become available" sleep 3 done echo "MariaDB is up and available" } As my application can start in 3 modes (as application, Celery_worker or Celery_beat) I somehow have to make sure that all migration are done before celery starts. Otherwise I'm running into issues that celery is missing one of these tables: django_celery_results_chordcounter django_celery_results_groupresult django_celery_results_taskresult Can somebody give me a hint what might be the best practices to check for open migration in this context? And only let celery start if all migrations are done?!... Would be awesome if this could also be handled in a simple bash function like the one above. Would be awesome If I could do more than just: python manage.py showmigrations | grep '\[ \]' Thanks in advance. -
requests_html + Django "There is no current event loop in thread 'Thread-1'."
Good, I have in Django this configuration in urls.py: urlpatterns = [ path('', views.index), ] and in views.py the index function where I pass through the variable a url, I have with requests_html: def index(request): url = request.GET.get('url') session = HTMLSession() resp = session.get(url) resp.html.render() RuntimeError: There is no current event loop in thread 'Thread-1'. But I get a bug when calling render() and I'm not using threads, any ideas? -
django get the file from temporary_file_path
in my django project user can upload multiple video files. if the extension of these files is .mp4 there is no problem of displaying them in video tag in browser but the problem with .mov files (video tag doesn't support .mov) so i change the extensions of .mov files: # views.py videos = request.FILES.getlist('videos') for v in videos: extension = os.path.splitext(v.temporary_file_path())[1].lower() if extension == '.mov': #change the extension of file mp4_path = os.path.splitext(v.temporary_file_path())[0] + '.mp4' Media.objects.create(user=request.user, videos=file_from_mp4_path) else: Media.objects.create(user=request.user, videos=v) the question is how can i get the file from temporary path and create the Media object -
I want to show some data from another website on my website using react
I have a project to get data from a django webserver and show them in my website using react.js any Idea? -
Django - Retrieve all manytomany field objects related to a specific model
I have my models reviews and news, both having a manytomany relation with Category model. Now I want to get all the categories associated with only one of these two models. For example, to get all categories associated with News model, I tried querying database with News.categories.all() but got AttributeError: 'ManyToManyDescriptor' object has no attribute 'objects'. News Model: class News(models.Model): ... categories = models.ManyToManyField("articles.Category", related_name="news") ... Reviews Model: class Reviews(models.Model): ... categories = models.ManyToManyField("articles.Category", related_name="reviews") ... -
Running Celery Celery as a Service Fails to Read Environment Variables on Ubuntu
I have completed my Django project and was looking to deploy to it. Since the project runs celery, it needed to be a daemonized to run after reboots automatically. I am able to run celery in a cmd line window and since i have setup a bunch of environment variables it is able to detect them all. (vuenv) vue@server:/home/dushyant/server/appdir/app$ celery -A appname worker --loglevel=INFO This is BASE Directory /home/dushyant/server/appdir/app Env Var: SK Exist Env Var: ENV Exist Current Environment is production Env Var: DB_PASS Exist Env Var: DB_PASS Exist This is static Root Directory /home/dushyant/server/appdir/app/static/ This is Media Root /mnt/mediadir/media/ Env Var: SERVER_EMAIL Exist Env Var: SERVER_EMAIL Exist Env Var: EMAIL_PASS Exist [2021-09-28 18:47:32,648: WARNING/MainProcess] No hostname was supplied. Reverting to default 'localhost' -------------- celery@server v5.1.2 (sun-harmonics) --- ***** ----- -- ******* ---- Linux-5.11.0-27-generic-x86_64-with-glibc2.29 2021-09-28 18:47:32 - *** --- * --- - ** ---------- [config] - ** ---------- .> app: app:0x7fd24f21fa90 - ** ---------- .> transport: amqp://guest:**@localhost:5672// - ** ---------- .> results: - *** --- * --- .> concurrency: 8 (prefork) -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> celery exchange=celery(direct) key=celery Changed app names and directories …