Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
django cannot redirect to index or admin after login
Can't redirect to the admin dashboard page or to the index after logging in even though the username and password are correct for views.py from django.shortcuts import redirect from django.contrib.auth import authenticate, login from django.contrib.auth.models import User from django.contrib import messages from auth.views import AuthView class LoginView(AuthView): def get(self, request): if request.user.is_authenticated: # If the user is already logged in, redirect them to the home page or another appropriate page. return redirect("index") # Replace 'index' with the actual URL name for the home page # Render the login page for users who are not logged in. return super().get(request) def post(self, request): if request.method == "POST": username = request.POST.get("email-username") password = request.POST.get("password") if not (username and password): messages.error(request, "Please enter your username and password.") return redirect("login") if "@" in username: user_email = User.objects.filter(email=username).first() if user_email is None: messages.error(request, "Please enter a valid email.") return redirect("login") username = user_email.username user_email = User.objects.filter(username=username).first() if user_email is None: messages.error(request, "Please enter a valid username.") return redirect("login") authenticated_user = authenticate(request, username=username, password=password) if authenticated_user is not None: # Login the user if authentication is successful login(request, authenticated_user) # Redirect to the page the user was trying to access before logging in if "next" in request.POST: … -
IntegrityError null value in column "home_id" of relation "WebApp_shorttermrental" violates not-null constraint for one Django model, not the other
I have two models with the same field. When I try to add a new instance to my database, one throws the error in the title, the other does not. models.py class Housesit(BaseModel): user = models.ForeignKey(CustomUser, on_delete=models.DO_NOTHING) home = models.ForeignKey(Home, on_delete=models.DO_NOTHING) title = models.CharField(max_length=256) <more fields> def __str__(self): return self.title class ShortTermRental(BaseModel): user = models.ForeignKey(CustomUser, on_delete=models.DO_NOTHING) home = models.ForeignKey(Home, on_delete=models.DO_NOTHING) title = models.CharField(max_length=256) <more fields> views.py def add_housesit(request): active_user = request.user if not active_user.is_authenticated: return warn_redirect_login(request) new_housesit = Housesit.objects.create(user=active_user) return redirect("update_housesit", pk=new_housesit.id) def add_short_term_rental(request): active_user = request.user if not active_user.is_authenticated: return warn_redirect_login(request) new_short_term_rental = ShortTermRental.objects.create(user=active_user) return redirect("update_short_term_rental", pk=new_short_term_rental.id) urls.py urlpatterns = ( [ path("housesit/add/", views.add_housesit, name="add_housesit"), path( "short_term_rental/add/", views.add_short_term_rental, name="add_short_term_rental", ), ] I can't for the life of me figure out what's different between them and why one throws an error and the other doesn't. I'm fully migrated. Where else could the source of the discrepency possibly be? A simple solution would be to simply add "null=True" to my Home field, but I'm trying to figure out why it's broken. Any insight greatly appreciated! -
Django STATIC_URL value "/static/" vs "static/"?
I'm a junior dev and know how pathing works. I'm wondering what the paths for the directory that static files will be served from are if the values for are STATIC_URL="/static/" and STATIC_URL="static/". I know there is a different since the latter cause my app to not find the static files even though it's the default value. Thank you! -
nesting a serializer by year then month
class Transactions(models.Model): id = models.CharField(max_length=100, primary_key=True) owner = models.ForeignKey(User, on_delete=models.CASCADE, null=True) date = models.DateField() watch = models.CharField(max_length=100) purchase_price = models.IntegerField() sale_price = models.IntegerField() My Transactions model has a date field, purchase price, and sale_price. @api_view(['GET']) @permission_classes([IsAuthenticatedOrReadOnly]) def profit_chart(request): current_year = datetime.now().year queryset = Transactions.objects.filter(date__year=current_year).values(month=ExtractMonth('date'), year=ExtractYear('date')).annotate( profit=Sum(F('sale_price')) - Sum(F('purchase_price'))).order_by('month') serializer = ProfitChartSerializer(queryset, many=True) return Response(serializer.data, status=status.HTTP_200_OK) My view sorts transactions by the current year and month and then calculates the profit for that month. class ProfitChartSerializer(serializers.ModelSerializer): year = serializers.IntegerField() month = serializers.IntegerField() profit = serializers.IntegerField() class Meta: model = Transactions fields = ['year', 'month', 'profit'] The response I get from DRF is below. [ { "year": 2024, "month": 8, "profit": 5000 } ] The question I am trying to figure out is how I can manipulate the above response to look like below. [ year: 2024 data: { month: 8 profit: 5000 } ] -
ImportError: cannot import name 'RSAAlgorithm' from 'jwt.algorithms'
The RSAAlgorithm PyJWT algorithm method fails to import, but I do have the PyJWT installed. Error: ImportError: cannot import name 'RSAAlgorithm' from 'jwt.algorithms' I checked if the package is available by running this command: poetry show|grep -i pyjwt pyjwt 2.9.0 JSON Web Token implementation in... -
Handling long create update tasks in django
I have task to create routes. A route can be an object with origin, destination, type. Origin and Destination are just a FK from Location ojbect. Imagine I have 3 Locations, a, b, c. with three types, X, Y, Z. Then possible routes are. routes = [(a,b,x), (a,c,x), (b,a, x), (b,c,x), (c, a, x), (c, b, x) , (a,b,y), (a,c,y), (b,a, y), (b,c,y), (c, a, y), (c, b, y) , (a,b,z), (a,c,z), (b,a, z), (b,c,z), (c, a, z), (c, b, z) ] Now, Im able to create the routes with same output. but the problem I'm going to have more than 43 thousands unique locations, on estimation it is going to be around 5.5B unique routes based on 3 types. So I wanted to have a different type approach where I can resume the process if something fails. we don't have problem if this takes days, but there will be a problem if we are starting it from Zero if something fails. So any idea or concept would be appreciated. We are using Django application to handle this. here's the real Models and Code. Im planning to use this create_route functions in the background with the help of celery and … -
ADMIN_MEDIA_PREFIX
Want to deploy a Django project. I want to use S3 in my project. In the Django settings.py, should i use? Is it still working in Django 5.1 ADMIN_MEDIA_PREFIX = "static/admin/" Thanks very much. -
Django runserver_plus sometimes does not return a response without a delay or another incoming request
I am running a Django server locally using runserver_plus with --nothreading option. Sometimes I send a request to any endpoint (from different clients, like the React frontend running in Google Chrome, Django admin, or Postman) and it takes a very long time to respond (usually 1.5+ minutes). Let's call the first request #1. While this request is being processed, if I open another tab and open any endpoints - thus, send request #2, the server immediately responds to request #2 and then immediately responds to request #1. The processing of request #1 does not start executing until the processing of request #2 is finished. Django 4.2, Django extensions 3.2, DRF 3.15. -
Best framework for a custom ERP
I am currently working as a developer at a company that manufactures and sells machines and equipment intended for the industrial sector. This company is currently using an ERP tool with a QML frontend and a Python backend. This tool was not originally designed by a professional developer, and while it is still usable today, more and more features are becoming unsustainable in the long term. New developments are based on poor programming principles, which perpetuates the software's lack of maintainability. I am therefore considering the following question: what would be the best framework to develop from scratch an internal ERP for a company that would allow for several things: Complete tracking of the company's projects, from order confirmation to after-sales service, including the sharing of production plans between a design office and a workshop, and the production stages of orders An open-source framework that would allow a small team to work effectively on the same project and ensure the software's maintainability (the company is currently small, but the software should remain viable even if the company experiences significant growth) A cross-platform application (Windows, Mac, Android, iOS) that would ensure the software's security against cyber attacks Integration with external APIs … -
TypeError: BaseForm.__init__() got an unexpected keyword argument 'request'
I'm using Django to make an authentication page (login, registration...) While I writing the login program I ran into this error and I can't understand where it come from users/urls.py path('login/', CustomLoginView.as_view(), name='login'), users/views.py class CustomLoginView(LoginView): form_class = AuthenticationForm template_name = 'users/login.html' # shitty patch to bypass the error def get_form_kwargs(self): """Return the keyword arguments for instantiating the form.""" kwargs = super().get_form_kwargs() # Remove 'request' from kwargs if it exists kwargs.pop('request', None) return kwargs users/form.py User = get_user_model() class AuthenticationForm(forms.Form): identifier = forms.CharField(max_length=100, required=True, widget=forms.TextInput(attrs={'placeholder': 'Username, Email, or Phone', 'class': 'form-control', })) password = forms.CharField(max_length=50, required=True, widget=forms.PasswordInput(attrs={'placeholder': 'Password', 'class': 'form-control', 'data-toggle': 'password', 'id': 'password', 'name': 'password', })) remember_me = forms.BooleanField(required=False) # this is from ChatGPT that suggested it to me to debug the problem... but it didn't clarify my ideas much def __init__(self, *args, **kwargs): print("Initialization arguments:", args, kwargs) # Debugging line super().__init__(*args, **kwargs) def clean(self): identifier = self.cleaned_data.get('identifier') password = self.cleaned_data.get('password') if identifier and password: user = authenticate(username=identifier, password=password) if not user: try: user = User.objects.get(email=identifier) if not user.check_password(password): raise forms.ValidationError("Invalid login credentials") except User.DoesNotExist: # Try to authenticate with phone number try: user = User.objects.get(phone=identifier) if not user.check_password(password): raise forms.ValidationError("Invalid login credentials") except User.DoesNotExist: raise forms.ValidationError("Invalid login credentials") … -
how can I debug TypeError at /cart/add_cart/2/
The problem occurs when I try to add a product on cart just by clicking on add to cart button. the following bug occures. please cooperate with me in this regard thanks. How can I modify my code so that as i click on add to cart button. concerned product will added in cart page carts>views.py from .models import Cart from .models import CartItem, Product # Create your views here. def _cart_id(request): cart = request.session.session_key if not cart: cart = request.session.create() return cart def add_cart(request, product_id): product = Product.objects.get(id=product_id) #get the product try: cart = Cart.objects.get(cart_id = _cart_id(request)) #get the cart using the cart_id present in the session except Cart.DoesNotExist: cart = Cart.objects.create( cart_id = _cart_id(request) ) cart.save() try: cart_item = CartItem.objects.get(product=product, cart=cart) cart_item.QUANTITY += 1 cart_item.save() except CartItem.DoesNotExist: cart_item = CartItem.objects.create( product = product, quantity = 1, cart = cart, ) cart_item.save() return redirect('cart') def cart(request): return render(request, 'store/cart.html')```` **urls.py file** ````from django.urls import path from .import views urlpatterns = [ path('', views.cart, name='cart'), path('add_cart/<int:product_id>/', views.add_cart, name='add_cart'),```` ] -
How to remove prefix e: from library spyne?
from spyne.application import Application from spyne.decorator import rpc from spyne.model.complex import ComplexModel from spyne.model.primitive import String, Integer from spyne.service import ServiceBase from spyne.protocol.soap import Soap11 from spyne.server.django import DjangoApplication from spyne import Unicode from django.views.decorators.csrf import csrf_exempt from lxml import etree class StatusData(ComplexModel): date = String class AppealsExternalStatusRequest(ComplexModel): messageId = String class DataWrapper(ComplexModel): AppealsExternalStatusRequest = AppealsExternalStatusRequest class AppealsService(ServiceBase): @rpc(DataWrapper, _returns=String, _body_style='bare', _operation_name='data') def receive_status(ctx, data_wrapper): print(data_wrapper) return "Received" soap_app = Application([AppealsService], tns='certain_path, in_protocol=Soap11(validator='lxml'), out_protocol=Soap11()) django_soap_app = DjangoApplication(soap_app) django_soap_app = csrf_exempt(django_soap_app) When I try to access to this via http://localhost/soap_api?wsdl, I receive in this format: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="path" xmlns:e="app.soap_service"> <soapenv:Header/> <soapenv:Body> <v1:data> <e:AppealsExternalStatusRequest> <!--Optional:--> <e:messageId>?</e:messageId> <e:statusData> <!--Optional:--> <e:date>?</e:date> <!--Optional:--> </e:statusData> </e:AppealsExternalStatusRequest> </v1:data> </soapenv:Body> </soapenv:Envelope> But I want to remove those e: prefixes, how that is possible? I added namespace in that case, it adds just other prefixes, and when I remove the namespace it adds e: prefixes. -
How to get initial CSRF token from Django to Angular frontend?
I have a Angular and Django setup for a site and I've set up CSRF tokens and everything. However I don't know how to generate an initial token so that the user can log in. When they try to log in, the backend complains that there is no CSRF token in the request. I tried sending an empty get request when the login page is loaded, but that doesn't seem to send back a token. I also tried adding the @ensure_csrf_cookie decorator but that doesn't work either. I imagine there is some standard way of doing this? -
Django Channels sync code causing issues under load (SyncConsumer and AsyncConsumer w/database_sync_to_async)
We are using Channels to serve part of huge ERP application that does transaction processing. Obviously, we can't be pure async just yet, and we are having issues load testing against large tenants (3000 WS clients making a request every second) We've tried scaling out and up (96 cores on 4 servers or 96 servers with 4 cores), but the limitation I believe is centered around the sync (mostly DB) code. Once a given requests eats an ASGI thread and takes more that a second or two, we start to get errors (connection closes, connects start failing). I've created a test rig, that running a pure async consumer even with a simulated delay, flys and never errors. Once I change the rig to use database_sync_to_async() calling a method that simulates a DB delay, it rolls over quickly. Still trying to understand how to configure Channels/Guicorn/Uvicorn to handle this load. Maybe someone can enlighten me... -
Annotate abstract Django Model instance type
Let's say I have two Django models: class MyModel1(models.Model): class Meta: abstract = True @classmethod def foo(cls, name): pass class MyModel2(models.Model): model1: MyModel1 = models.ForeignKey("MyModel1") First model is abstract, so I have to refer to it lazily. Now if I try to access mymodel2.model1. Pylance will suggest foo as an option. What is the correct way to assign model1 field to be an instance, not the class itself? -
Django connects Signal, but App not in INSTALLED_APPS
I have two Django apps, foo and bar, which are both listed in the INSTALLED_APPS setting. foo sends a Signal which is received by bar. I want to test foo. So, I want to isolate it, i.e., bar should not listen to the signal. Usually, bar connects to the signal using the AppConfig.ready() method: class BarConfig(AppConfig): def ready(self): from foo.signals import foo_signal from .signals import handle_foo_signal foo_signal.connect(handle_foo_signal) In the test code, I remove bar from the INSTALLED_APPS setting, using the @modify_settings() decorator: @modify_settings(INSTALLED_APPS=dict(remove=["bar"])) def test_foo(self): ...test code... I would expect, that bar would not listen to the signal. However, it does. I know, that I could disconnect each Signal. But I'm looking for a way to temporary "remove" an app entirely. Is there a way to isolate apps and their Signal receivers easily? I debugged the code and found out, that the bar app is still in INSTALLED_APPS when ready() is called. I expected, that the app config is not called at all. -
Iterate through Django models fields with for loop
I have a model in Django named models_bdc models.py class models_bdc(models.Model): id_bdc = models.CharField(primary_key=True, max_length=50) bdc_index_line_1 = models.CharField(max_length=50) bdc_quantity_1 = models.CharField(max_length=20) bdc_description_1 = models.CharField(max_length=50) bdc_index_line_2 = models.CharField(max_length=50) bdc_quantity_2 = models.CharField(max_length=100) bdc_description_2 = models.CharField(max_length=100) bdc_index_line_3 = models.CharField(max_length=50) bdc_quantity_3 = models.CharField(max_length=100) bdc_description_3 = models.CharField(max_length=100) In my view I would like to iterate through the fields with a for loop and replace the digit by the i counter value I would look like something like : views.py queryset = models_bdc.objects.filter(id_bdc=1) [...] for i in range(3): models_bdc.bdc_index_line_ + i models_bdc.bdc_quantity_ + i models.bdc.bdc_description_ + i But it's not working. Is there a way to do this ? Thanks -
Ensure Sequential Task Execution with Celery in Django REST Framework?
I have a Django REST Framework project where I need to call two Celery tasks sequentially. Specifically, I need to call first_function and then after some operations, call the second_function, ensuring that second_function runs only after first_function has completed. # tasks.py from celery import shared_task @shared_task def first_function(): # Logic for the first function @shared_task def second_function(): # Logic for the second function This is my view.py first_function.delay() # some codes .... # now i need to call my second_function.delay() chain(first_function.s(), second_function.s()).delay() My concerns are: If multiple requests are made to the view simultaneously, will second_function correctly wait for the corresponding first_function to complete? I'm a little confused, How can I ensure that second_function runs after the specific first_function related to the same request?(Note: I can't add sleep or any blocking code in the middle of my code.) Any guidance or best practices for handling this scenario with Celery would be greatly appreciated! -
error shows when using libreoffice to convert docx file to pdf
I upload docx file in html form then I want to convert this file to pdf in ubuntu server but it shows error like CalledProcessError at /add-document Command '['libreoffice', '--headless', '--convert-to', 'pdf', '/var/www/html/dev/media/documents/Lavender_Bay_Boatshed_Website_Testing_61gWm6r.docx', '--outdir', '/var/www/html/dev/media/documents/Lavender Bay Boatshed Website Testing.pdf']' returned non-zero exit status 77. @login_required def add_document(request): title = "Add document" if request.method == 'POST': file = request.FILES.get('file') check = request.POST.get('check') subject = request.POST.get('subject') message = request.POST.get('message') print(request.POST) names = [] emails = [] for key in request.POST: if key.startswith('email_'): emails.append(request.POST[key]) elif key.startswith('name_'): names.append(request.POST[key]) print(emails) print(names) recipients = [] list_of_dicts = [{'email': email, 'name': name} for email, name in zip(emails, names)] if file: if (file.name.endswith('.jpg')) or (file.name.endswith('.png')): obj = Documents(document=file,name=file.name,user=request.user) obj.save() image = Image.open(obj.document.path) iml = image.convert('RGB') folder = r'C:\Users\admin\Desktop\projects\Document-sign\media\documents' path = os.path.join(folder, file.name.split('.')[0] + '.pdf') os.remove(obj.document.path) iml.save(path) obj.document = f"documents/{file.name.split('.')[0]}.pdf" obj.save() os.remove(obj.document.path) if check: request.session['check'] = False return redirect('sign_document') else: recipients.append({'emails':list_of_dicts,'subject':subject,'message':message}) request.session['recipients'] = recipients request.session['check'] = True return redirect('make_envelope') elif file.name.endswith('.docx'): obj = Documents(document=file, name=file.name, user=request.user) obj.save() # Define paths path = os.path.join(settings.MEDIA_ROOT, 'documents') input_path = obj.document.path # Run LibreOffice conversion try: result = subprocess.run( ['libreoffice', '--headless', '--convert-to', 'pdf', input_path, '--outdir', path], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) print(result.stdout) print(result.stderr) except subprocess.CalledProcessError as e: print("Error occurred:", e.stderr) raise # Remove the … -
Playwright: Missing Dependencies for Running Browsers on AWS EC2 (Ubuntu)
I'm trying to use Playwright in a Python project to automate browser actions. The setup works perfectly on my local machine, but I encounter issues with missing system dependencies when deploying the project on an AWS EC2 instance. Environment: AWS EC2 Instance: Ubuntu 20.04 Python: 3.12 Playwright Version: 1.45.1 Steps Taken: Installed Playwright: pip install playwright Installed Playwright browsers: python -m playwright install Tried installing system dependencies: sudo npx playwright install-deps Error Messages: I still receive the following error message when trying to run Playwright on the AWS EC2 instance: "BrowserType.launch: Executable doesn't exist at /root/.cache/ms-playwright/webkit-2035/pw_run.sh\n╔════════════════════════════════════════════════════════════╗\n║ Looks like Playwright was just installed or updated. ║\n║ Please run the following command to download new browsers: ║\n║ ║\n║ playwright install ║\n║ ║\n║ <3 Playwright Team ║\n╚════════════════════════════════════════════════════════════╝" Here is the screenshot of the error: Error on Postman Code Snippet: import asyncio import re import logging import time from playwright.async_api import async_playwright async with async_playwright() as p: browser = await p.webkit.launch(headless=True) for attempt in range(retries): try: context = await browser.new_context(user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3") page = await context.new_page() for nav_attempt in range(retries): try: await page.goto(url, timeout=30000) # Reduced timeout for faster retries logger.info(f"Navigated to {url}") break except … -
Weasyprint dependency 'gobject-2.0-0' installation error on Railway.app
I am using this dockerfile configuration for my django project FROM python:3.12.2-slim-bullseye Install system dependencies RUN apt-get update && apt-get install -y \ python3-pip \ python3-cffi \ python3-brotli \ libpango1.0-0 \ libpangoft2-1.0-0 \ libharfbuzz-subset0 \ libffi-dev \ libcairo2 \ libcairo2-dev \ libjpeg62-turbo-dev \ libgdk-pixbuf2.0-0 \ libgdk-pixbuf2.0-dev \ libgobject-2.0-0 \ libgobject2.0-dev \ build-essential \ && apt-get clean ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH Set the working directory WORKDIR /PAQSBackend Copy the application code COPY . /PAQSBackend/ RUN pip install -r requirements.txt COPY PAQSBackend.wsgi /PAQSBackend/PAQSBackend.wsgi CMD ["gunicorn", "--bind", "0.0.0.0:8000", "PAQSBackend.wsgi"] The build and deployment runs fine. However, when I run the project, I get this error message File "/opt/venv/lib/python3.11/site-packages/cffi/api.py", line 827, in loadbackend_lib raise OSError(msg) OSError: cannot load library 'gobject-2.0-0': gobject-2.0-0: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0' I would want to know what is actually happening and also how to resolve this. I only face this issue when I am deploying it on Railway.app -
Django Axes Lockout Not Working as Expected
I’m using Django Axes to lock out users after a certain number of failed login attempts. However, despite my configurations, users are still able to log in immediately after being locked out if they enter the correct credentials. I want to ensure that users are locked out for 1 hour, regardless of whether they enter the correct credentials during that period. Here are my current settings in settings.py: from datetime import timedelta AXES_FAILURE_LIMIT = 3 AXES_LOCK_OUT_AT_FAILURE = True AXES_COOLOFF_TIME = timedelta(hours=1) # Set cool-off time to 1 hour AXES_LOCKOUT_CALLABLE = "customer_manager.views.lockout" AXES_RESET_ON_SUCCESS = False AXES_ENABLE_ACCESS_FAILURE_LOG = True AXES_RESET_COOL_OFF_ON_FAILURE_DURING_LOCKOUT = False AXES_SENSITIVE_PARAMETERS = [] AXES_LOCKOUT_PARAMETERS = ["username"] AXES_CACHE = 'default' CACHES = { 'default': { 'BACKEND': 'django_redis.cache.RedisCache', 'LOCATION': 'redis://127.0.0.1:6379/1', 'OPTIONS': { 'CLIENT_CLASS': 'django_redis.client.DefaultClient', } } } I have verified the following: axes.middleware.AxesMiddleware is included in the MIDDLEWARE settings, placed after AuthenticationMiddleware. I have run python manage.py migrate and confirmed there are no pending migrations. I have temporarily removed the custom lockout callable to test with default settings. Despite these configurations, users are still able to log in immediately after being locked out if they enter the correct credentials. Here are some relevant log entries: AXES: User login failed, running database handler … -
why when i start a subprocess in python using get request starts only at the second time
i have a button that create a database inside settings.py and add it to mysql DB . The button sends a get request to api endpoint. The problem is when i click the button the response get back with 500 response status code, when i click the second time it passes and create the DB and return 200 ok you can see more details as the screen shots below i added in settings.py: ALLOWED_HOSTS = ['django','localhost','127.0.0.1'] (django is a name inside nginx conf file) this is my middleware: MIDDLEWARE = [ "MyApp.middleware.ServerCheckMiddleware", "corsheaders.middleware.CorsMiddleware", "django.middleware.common.CommonMiddleware", . . ] The file execution responsible for the adding of DB is ran inside a views file: class ActivateTheUser(APIView): def get(self, request, email): cloneresult = subprocess.run( [sys.executable, clone_db_script_path, '--host', _host, '--user', _user, '-- password', _password, '--database', _dbname ], capture_output=True, text=True ) -
Deploy multipe Django, Celery & Redis App in one VPS
I am planning to deploy multiple applications(approx 100+) in single VPS. Each Django app will have it's own celery and redis app. How should I deploy all these applications properly? I have tried to create individual service for each application but it became impossible to create a new service each time I'm deploying a new application. -
Django celery task manager
please sugest me a open-source web GUI (except " FLOWER ") to manage my Django applications celery tasks (like :- view , delete , restart , flush ) using redis as a message broker . I already tried apache airflow for the same but , unable to integrate celery tasks with it . if any documentation for the same please share it .