Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django-CSP - AJAX request with vanilla JS blocked by CSP
I have a Django-based D&D-wiki webpage that I'm working on in my free time which I'm using to learn more about web development. I recently implemented a Content-Security-Policy using django-csp. That went well and the switch was fairly painless, given that I only had 20 or so templates to deal with. Here my CSP settings: //Django settings.py CSP_DEFAULT_SRC = ("'none'",) CSP_STYLE_SRC = ("'self'", 'stackpath.bootstrapcdn.com', 'fonts.googleapis.com', "'unsafe-inline'", 'cdn.jsdelivr.net', 'cdnjs.cloudflare.com', 'rawcdn.githack.com', 'maxcdn.bootstrapcdn.com',) CSP_SCRIPT_SRC = ("'self'", 'localhost', "default-src", 'stackpath.bootstrapcdn.com', 'code.jquery.com', 'cdn.jsdelivr.net', 'cdnjs.cloudflare.com','maxcdn.bootstrapcdn.com',) CSP_IMG_SRC = ("'self'", 'ipw3.org', 'data:', 'cdn.jsdelivr.net', 'cdnjs.cloudflare.com', 'i.imgur.com',) CSP_FONT_SRC = ("'self'", 'fonts.gstatic.com', 'maxcdn.bootstrapcdn.com',) CSP_MEDIA_SRC = ("'self'",) CSP_INCLUDE_NONCE_IN = ('style-src',) Even more recently started learning about AJAX requests and wanted to implement a simple POST request. Sadly, my CSP blocks this request, which I believe should be allowed given that I allowed self and localhost in CSP_SCRIPT_SRC: //JS Event Listener that creates and sends the AJAX request document.getElementById('create-timstamp').addEventListener('click', function(event){ const isValid = validateForm(); if (isValid){ xhr = new XMLHttpRequest(); xhr.open('POST', getCreateTimestampURL(), true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); const csrf = document.querySelector('input[name="csrfmiddlewaretoken"]').value; xhr.setRequestHeader("X-CSRF-TOKEN", csrf); xhr.onload = function(){ document.querySelector('.timestamp-create-box').remove(); } const timestampForm = document.forms['timestamp-form']; const timestamp_seconds = toTimeInt(timestampForm['time'].value); const timestamp_name = timestampForm['name'].value; const data = `name=${timestamp_name}&time=${timestamp_seconds}`; xhr.send(data); return false; } //For completion's sake here also the … -
Page not found...The current path, customer, didn't match any of these. Django,python
I feel like I just need another pair of eyes, cant figure this out on my own for several hours. I am a beginner as you can tell. Thought that the problem might be some type error in these two files but I just cannot find it views.py file from django.shortcuts import render from django.http import HttpResponse from.models import * def home(request): customers=Customer.objects.all() orders=Order.objects.all() total_customers=customers.count() total_orders=orders.count() delivered=orders.filter(status="Delivered").count() pending=orders.filter(status="Pending").count() context={'orders':orders,'customers':customers, 'pending':pending, 'delivered':delivered,'total_orders':total_orders} return render(request, 'accounts/dashboard.html',context) def products(request): products = Product.objects.all() return render(request, 'accounts/products.html',{'products' :products}) def customer(request, pk): customer=Customer.objects.get(id=pk) return render(request, 'accounts/customer.html') ****urls.py**** from django.urls import path from . import views urlpatterns = [ path('', views.home), path('customer/<str:pk>/', views.customer), path('products/', views.products), ] error by django Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/customer Using the URLconf defined in crm1.urls, Django tried these URL patterns, in this order: admin/ customer/<str:pk>/ products/ The current path, customer, didn't match any of these. -
Djnago admin.StackedInline logic to automatic clone related models
I have a model A with oneToMany relationship with Model B. Django admin side, to manage this relationship, I'm using one admin.StackedInline Into this formset I added a custom Integer field 'MYFIELD' (not related to the model). My idea is this: when the user save the model, for each related model, I would like check this MYFIELD to clone this related model. This is a sort of multiplier: for each related model, if the value is N I will create N clones of it. Probably I have to implement this logic into the method save_related but it's not clear for me how can duplicate. -
Reset auto-increment index value on SQLite(Django)
I'm creating a Blog app using Django. So when I delete a post which is at the database index of 3 and adds another post to the blog, it adds the post on the database column of index 4, and there won't be any column of index 3. So How can I change that new post index to 3 itself? -
request.session.modified vs SESSION_SAVE_EVERY_REQUEST
I understand how these work differently in practice. For example, if I have: request.session.['cart'].remove('item') the session won't be saved without explicitly calling request.session.modified = True or having SESSION_SAVE_EVERY_REQUEST = True in settings.py. Or I could get around using either by using: cart = request.session['cart'] cart.remove('item') request.session['cart'] = cart My question is if there is any drawback to using SESSION_SAVE_EVERY_REQUEST whether in performance or unintended consequences. I don't see any reason why I wouldn't want to save the session if I modified a value in it. -
Procfile issue while deploying on Heroku
I am deploying y Django application on Heroku. At first I added the Profile this way: I could run 'heroku local', while in the folder where Procfile with no issue and the app was running fine locally. Then I realized while deploying on Heroku that Procfile had to be in the root directory for it to be recognized. So I changed it's directory: Running 'heroku local' I got an no module names'trusty_monkey.wsgi' error. So I change my Procfile from : web: gunicorn trusty_monkey.wsgi to: web: gunicorn trusty_monkey.trusty_monkey.wsgi But now I have this error: What I don't understand is why it doesn't get the 'trusty_monkey.settings' now when they were no issues before? -
Django / Apache / Ubuntu Static files not being served
Everything was working fine until I moved from my local PC to a web server (AWS Ubuntu). I am using Apache with WSGI adapter. I followed all the guides I could and have been at this for several days and still can't figure out why none of my images or styles are displaying. I am having trouble wrapping my head around how static files work and there may be a simple reason why this isn't working but I can't figure it out. I have followed so many guides and am at a loss. Yes I have run collectstatic, but all this seems to do is throw all my static files into the static folder. Not sure what the purpose of this is and I am having trouble understanding it on the django website. You can view my site here: http://13.56.18.7/ The site loads without styles, If you check Chrome Dev tools, it shows none of my files being found: Build: urls.py from django.contrib import admin from django.urls import path from app_main.views import (home_page, services_page, history_page, offers_page, contact_page) from django.conf.urls import url from django.conf import settings from django.conf.urls.static import static urlpatterns = [ url(r'^$', home_page, name='home_page'), path('admin/', admin.site.urls), path('services/', services_page), url(r'^services/', … -
Django orm: moving selected records from a column to another and save to database
I have the following list: list = [ "WP1788/1", "WP1810/1", "WP1810/2", "WP1812/1", "WP1815/1", "WP1818/1", "WP1823/1", "WP1827/1", "WP1828/1", "WP1828/2", "WP1828/3", "WP1828/4", "WP1828/5", "WP1828/6", "WP1837/1", "WP1840/1", "WP1841/1", "WP1855/1", "WP1860/1", "WP1861/1", "WP1863/1", "WP1872/1", "WP1873/1", "WP1873/2", "WP1879/1", "WP1884/1", "WP1888/1", "WP1895/1", "WP1895/2", "WP1906/1", "WP1906/2", "WP1908/1", "WP1908/2", "WP1909/1", "WP1909/2", "WP1913/1", "WP1918/1", "WP1919/1", "WP1919/2", "WP1919/3", "WP1922/1", "WP1928/1", "WP1928/3", "WP1928/4", "WP1928/5", "WP1928/6", "WP1944/1", "WP1944/2", "WP1945/1", "WP1946/1", "WP1947/1", "WP1955/1", "WP1962/1", "WP1965/1", "WP1965/2", "WP1967/1", "WP1969/1", "WP1977/1", "WP1988/1", "WP1991/1", "WP1991/5", "WP1995/1", "WP2002/1", "WP2012/1", "WP2015/1", "WP2017/1", "WP2021/1", "WP2022/1", "WP2024/1", "WP2033/1", "WP2033/2", "WP2044/1", "WP2050/1", "WP1585/1", "WP1585/2", "WP1585/4", "WP1585/5", "WP1585/6", "WP1585/7", "WP1585/8", "WP1585/9", "WP1624/103", "WP1624/105", "WP1624/108", "WP1624/109", "WP1624/118", "WP1624/119", "WP1624/120", "WP1624/121", "WP1624/123", "WP1624/129", "WP1624/130", "WP1624/137", "WP1624/145", "WP1624/165", "WP1624/83", "WP1624/85", "WP1624/91", "WP1624/93", "WP1670/1", "WP1708/10", "WP1708/12", "WP1708/13", "WP1708/14", "WP1708/15", "WP1708/17", "WP1708/20", "WP1708/22", "WP1708/26", "WP1708/27", "WP1708/28", "WP1779/26", "WP1838/1", "WP1844/1", "WP1876/1", "WP1882/1", ] I would like to select the wps (Wp model) in the database with ID in list, something like: wps_selected = Wp.objects.filter(ID in list) and then copy the value from the column working_hours to the column non_profitable and save it to database. Is that possible using ORM. I know how to do it in SQL but I am still a bit comfuased about using ORM -
EBS + Django - MEDIA doesn't work (permission denied)
I have a Django project on Elastic Beanstalk. Now I'm trying to make media work. Since media is a user-uploaded content I guess I can't just use myproject/media folder. When I try to upload/save a file it returns: PermissionError: [Errno 13] Permission denied: '/opt/python/bundle/7/app/media' Do you know what to do? Is there a place that I can use as a media folder that won't be deleted? In settings.py: MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' -
Can i direct a form to specific user with Django?
Hello I have created a model for a form that asks for the recipient, title, content of the message. I want that message to be viewed by the recipient only how can i do that? -
How to display a text, from a python program, to a HTML form in Django?
I am new to Django and web programming and HTML. I am trying to create a webpage using Django, with following functionality: When the page is browsed for the first time, it should invoke a program rules.py and display a text output from rules.py to a paragraph in the page. The page contains a form with label as 'name'. The user will look at the message displayed from rules.py and enter a name in the form and click on 'submit' On clicking submit, the page should POST the request, alongwith the 'name' entered and execute program validate.py, that returns a numeric code (0: success, 1: invalid), and a text (next instruction if success, error message is failure). This text should be displayed back to my page, in the same place where the output from rules.py was displayed earlier. Then based on the message displayed, user will enter another name, and same process will repeat. How to display a text in the form that is output from a python program? I am able to display the output in the label of the input name field, using code below. But I don't want to change the label, I want a paragraph / … -
I can't connect to minio service from another service in docker-compose
I have my minio setup in docker compose like this : service: minio: image: minio/minio:RELEASE.2020-09-21T22-31-59Z container_name: backend-minio volumes: - minio:/data environment: MINIO_ACCESS_KEY: minio MINIO_SECRET_KEY: minio123 expose: - 9000 command: server /data volumes: minio: I want to connect to the minio from another app I use minio:9000 or localhost:9000 as the url I get this error for both : urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='minio', port=9000): Max retries exceeded with url: /django?location= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb222a79810>: Failed to establish a new connection: [Errno 111] Connection refused')) what's wrong with the minio config in the docker compose I also checked and all env variables are set any idea? -
Django URLS Slugs Multiple Paths
I am working on a website with Django that has one template for a model class that has two items in the database, categoryone and categorytwo, but I need the index.html template to link to different urls for each item of the model class, so one url path for categoryone and another for categorytwo, as they are both different sections of a website with the same index template, how can I do this using only one template? Thank you! models.py class PostSection(models.Model): section_heading = models.CharField(max_length=30) section_desc = models.CharField(max_length=300, blank=True, null=True) class Meta: ordering = ['section_heading'] verbose_name_plural = 'Content Section' def __str__(self): return f"{self.section_heading}" class Post(models.Model): post_section = models.ForeignKey(PostSection, on_delete=models.CASCADE, related_name="posts") post_heading = models.CharField(max_length=30, unique=True) post_desc = models.CharField(max_length=300, blank=True, null=True) post_img = models.ImageField(upload_to= 'media', blank=True, null=True) post_highlight_img = models.ImageField(upload_to= 'highlights', blank=True, null=True) post_highlight_desc = models.CharField(max_length=300, blank=True, null=True) post_date = models.DateField(null=True, blank=True) featured = models.BooleanField(default=False) order = models.IntegerField(blank = True, null = True) tag = models.ManyToManyField(Tag, help_text="sth", blank=True, null=True) slug = models.SlugField(null=False, blank=False, unique=True) def __str__(self): return self.slug class Meta: ordering = ('order', 'post_date') def display_tag(self): return ', '.join([ tag.name for tag in self.tag.all()[:8] ]) display_tag.short_description = 'Tag' def save(sender, instance, *args, **kwargs): instance.slug = slugify(instance.post_heading) def get_absolute_url(self): return reverse("architecture", kwargs={"slug": self.slug}) … -
'admin-chat' is not a registered namespace
Whenever I click the button this error showup I have no idea why is this happening. error NoReverseMatch at /admin-chat-list/ 'admin-chat' is not a registered namespace html file <form mthod="POST" action="{% url 'admin-chat:{{data.email}}' %}"> <input type="submit" value="CHAT"> </form> urls.py path('admin-chat/<str:merchant_email>/', views.admin_chat, name='admin-chat'), views.py def admin_chat(request, merchant_email): print(merchant_email) if request.method == 'POST': msg = request.POST['message'] Message.objects.create(sender=request.user, receiver=merchant_email, message=msg) return redirect('admin-chat') return render(request, 'dashboard/admin/chat.html') -
Need help in final year project urgently
Any web developer who knows Django and JavaScript well . Need help urgently. Please someone willing to help via zoom meeting? -
How to use function TruncDay(or another one like TruncMonth) to sum results from two or more models?
for example I'm using this query to get counts by month: Item1.objects .annotate(month=TruncMonth('timestamp')) .values('month') .annotate(c=Count('id')) .values('month', 'c') now to every month I want to sum every month of the second model (Item2) Item2.objects .annotate(month=TruncMonth('timestamp')) .values('month') .annotate(c=Count('id')) .values('month', 'c') Can i do this with the ORM instead programatically? i know that i can iterate the results and sum if the month match, but i don't want to do that. -
Django model based on an SQL table-valued function using MyModel.objects.raw()
If it's relevant I'm using Django with Django Rest Framework, django-mssql-backend and pyodbc I am building some read only models of a legacy database using fairly complex queries and Django's MyModel.objects.raw() functionality. Initially I was executing the query as a Select query which was working well, however I received a request to try and do the same thing but with a table-valued function from within the database. Executing this: MyModel.objects.raw(select * from dbo.f_mytablefunction) Gives the error: Invalid object name 'myapp_mymodel'. Looking deeper into the local variables at time of error it looks like this SQL is generated: 'SELECT [myapp_mymodel].[Field1], ' '[myapp_mymodel].[Field2] FROM ' '[myapp_mymodel] WHERE ' '[myapp_mymodel].[Field1] = %s' The model itself is mapped properly to the query as executing the equivalent: MyModel.objects.raw(select * from dbo.mytable) Returns data as expected, and dbo.f_mytablefunction is defined as: CREATE FUNCTION dbo.f_mytablefunction ( @param1 = NULL etc etc ) RETURNS TABLE AS RETURN ( SELECT field1, field2 etc etc FROM dbo.mytable ) If anyone has any explanation as to why these two modes of operation are treated substantially differently then I would be very pleased to find out. -
Django forms - create a form for each object in model, and then save to the corresponding PK
I'm new to django (and programming in general). Sorry if I used the wrong vocabulary (and please correct me). This is what i'm trying to do: I have this model: Class A(models.Model): name = models.CharField(max_length=100, null=True, default='John') first_number = models.FloatField(blank=True, default=1) second_number = models.FloatField(blank=True, default=2) third_number = models.FloatField(blank=True, default=3) And I have this form: class Numbers(ModelForm): class Meta: model = A fields = ['first_number', 'second_number'] In my template, I created a for for x in a (given that 'a' is A.objects.all()): {% for x in a %} {{form}} {% endfor %} When I submit the form, though, I cant get the corresponding numbers. I only saves the last number I enter in both 'first_number' and 'second_number' for the both objects that I created. How can I save the correct values? -
Automatically configuring settings to local or production depending on the IP address
I have 4 settings files - __init__.py (which controls the other 3 files) base.py (which has settings needed when running the site locally or in production mode) local2.py (which has settings needed for running the site locally) production.py (which has settings needed for running the site in production) In __init__.py I want to identify the ip address which would then dictate if we need to use local2.py or producction.py. My problem is a lot of the ways I know to capture ip address only work with request. Which from what I gather is something you pass to views. Therefore these methods do not work in my settings __init__.py file. Does anyone know a way of capturing the ip address via the setting file? I looked at Django: Get remote IP address inside settings.py but it did not help me. -
Django calculate models total field
I want to return rate, but got this error in admin unsupported operand type(s) for +: 'NoneType' and 'NoneType' class SomeModel(models.Model): code_style_rate = models.DecimalField(max_digits=4, decimal_places=2) decision_rate = models.DecimalField(max_digits=4, decimal_places=2) severity_rate = models.DecimalField(max_digits=4, decimal_places=2) @property def rate(self): return (self.code_style_rate + self.decision_rate + self.severity_rate) / 3 def __str__(self): return self.rate -
Django server returning HTML instead of JSON when using fetch()
I'm trying to fetch data from an API in my own Django server but for some reason, it is returning HTML instead of a JSON object Here's the API route Im tring to fetch from: path("emails/<str:mailbox>", views.mailbox, name="mailbox") Here's the mailbox function in views.py: @login_required def mailbox(request, mailbox): # Filter emails returned based on mailbox if mailbox == "inbox": emails = Email.objects.filter( user=request.user, recipients=request.user, archived=False ) elif mailbox == "sent": emails = Email.objects.filter( user=request.user, sender=request.user ) elif mailbox == "archive": emails = Email.objects.filter( user=request.user, recipients=request.user, archived=True ) else: return JsonResponse({"error": "Invalid mailbox."}, status=400) # Return emails in reverse chronologial order emails = emails.order_by("-timestamp").all() return JsonResponse([email.serialize() for email in emails], safe=False) Here's the model i'm trying to fetch from: class Email(models.Model): user = models.ForeignKey("User", on_delete=models.CASCADE, related_name="emails") sender = models.ForeignKey("User", on_delete=models.PROTECT, related_name="emails_sent") recipients = models.ManyToManyField("User", related_name="emails_received") subject = models.CharField(max_length=255) body = models.TextField(blank=True) timestamp = models.DateTimeField(auto_now_add=True) read = models.BooleanField(default=False) archived = models.BooleanField(default=False) def serialize(self): return { "id": self.id, "sender": self.sender.email, "recipients": [user.email for user in self.recipients.all()], "subject": self.subject, "body": self.body, "timestamp": self.timestamp.strftime("%b %-d %Y, %-I:%M %p"), "read": self.read, "archived": self.archived } Here's the JS code: if(document.querySelector('h3').innerHTML === 'Inbox'){ fetch('/emails/inbox') .then(response => response.json()) .then(emails => { console.log(emails); }); Finally, here's my console output no … -
How to serialize foreignkey in Django Rest Framwork?
I have jobs model and categories model and they have one to many relationship. so I want to get the details of category as well when i pull the job model. Abstract Job Model class JobAbstractModel(models.Model): title = models.CharField(max_length=150) no_of_vacancy = models.PositiveIntegerField() offered_salary = models.CharField(max_length=200) deadline = models.DateTimeField() education_level = models.CharField(max_length=200) description = models.TextField(blank=True) description_points = models.TextField(blank=True) skills = models.TextField() other_specification = models.TextField() created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) updated_by = models.ForeignKey(User, on_delete=models.CASCADE, related_name='+') is_active = models.BooleanField(default=1) class Meta: abstract = True Job Model class Job(JobAbstractModel): category = models.ForeignKey(Category, on_delete=models.CASCADE, related_name='categories') job_level = models.CharField(max_length=50, choices=JOB_LEVEL_CHOICES, default='Mid') employment_type = models.CharField(max_length=50, choices=EMPLOYEMENT_TYPE_CHOICES, default='Full') experienced_required = models.FloatField() created_by = models.ForeignKey(User, on_delete=models.CASCADE, related_name='jobs_created_by') def __str__(self): return self.title Category Model class Category(models.Model): name = models.CharField(max_length=150) is_active = models.BooleanField(default=1) image = models.ImageField(upload_to='categories_images/') def __str__(self): return self.id + ":"+self.name Serializers.py class CategorySerializer(serializers.ModelSerializer): image = serializers.SerializerMethodField() class Meta: model = Category fields = "__all__" def get_image(self, category): request = self.context.get('request') image_url = category.image.url return request.build_absolute_uri(image_url) class JobOverViewSerializer(serializers.ModelSerializer): #category = serializers.CharField(source='category.name', read_only=True) categories = CategorySerializer(read_only=True, many=True) class Meta: model = Job fields = ['id', 'no_of_vacancy', 'employment_type', 'experienced_required', 'categories'] jobs.py class JobCategoriesView(APIView): def get(self, request): categories = Category.objects.all() serializer = CategorySerializer(categories, many=True, context={'request': request}) return Response(serializer.data) class JobOverView(APIView): def get(self, … -
Django separate settings and .env files (python-decouple): the specified path was not found for static files
I have developed a Django Project and try to manage different configuration (dev and prod) and .env using python-decouple. Below my project architecture and different config files. Maybe I misunderstand but in my comprehension : I have differents settings.py files (dev and prod) that inherit from my "base" settings.py Some variables must be kept secret: these variable are store in .env files that will not be share (.gitignore) In production, these secret variables are read from .env in settings files I run python manage.py migrate --settings=core.settings.dev python manage.py runserver --settings=core.settings.dev and got an error FileNotFoundError: [WinError 3] The specified path was not found: 'D:\Users\xx\DevSpace\PROJECT_FOLDER\core\static' That right because static folder is at the same level as core app. But how to configure this path? - PROJECT_FOLDER |_ core |_ wsqi.py |_ settings |_ __init__.py |_ .env |_ base.py |_ dev.py |_ prod.py |_ manage.py |_ static |_ css |_ images |_ db.sqlite3 .env SECRET_KEY=rqps9azjw7i0@_(qxirwr!@0w3f)$prsky9l7bt8t-(y)_tiuj base.py from decouple import config STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR,'static'), os.path.join(BASE_DIR,'randomization/static'), os.path.join(BASE_DIR,'unblind/static'), os.path.join(BASE_DIR,'pharmacy/static'), ) dev.py from .base import * SECRET_KEY = 'f!hap7sff#f@8$1iix@(%d4f=88swwetxkhbq=%^x)ga2eowbs' DEBUG = True prod.py from .base import * SECRET_KEY = config("SECRET_KEY", default="unsafe-secret-key") DEBUG = False -
Static CSS not being applied to django-allauth templates
My templates do not seem to be able to access static css files. The project using all-auth for authentication. My file structure is as follow: Project Folder App 1 App 2 Static CSS style.css Templates Account login.html signup.html base.html home.html base.html is as follow: {% load static %} <!DOCTYPE html> <html lang="en"> <head> <title>Shuffle</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href='{% static "css/style.css" %}' rel="stylesheet"> </head> <body> <div id="card"> {% block content %} {% endblock %} </div> <!--card --> </body> </html> The rest of the templates extend from base.html. On inspecting the rendered page, all the html are correct but the styling is missing. Please help! :) -
Multiple nginx instances = gateway time-out; each instance works fine if addressed directly
This was working yesterday, but I made some changes which I have now reverted, and now it seems to be broken, and I can't find out why. I desperately need some tips on how to debug this. Background I've made multiple applications that move around quite a bit. In each app's repository, I've included nginx and docker configurations for two scenarios: Running as the only application on a server, and running alongside other applications. Because I want each repository to be "complete", I don't want any of the applications to assume whether or not they will be served by a "main" nginx instance in front. They should be capable of running using their "default", "standalone" configuration, and of existing alongside any number of other applications that also listen on the same ports, etc. Of course, running multiple web servers or APIs, for example, alongside one another would cause port allocation conflicts (and other problems), so there is some manual setup involved when running multiple apps on the same server. Almost all these applications consist of a Django REST framework server, a postgres database and an nginx reverse proxy. I made a separate repository with template files and instructions for running …