Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
How can i display all posts with for example tag "linux" in a row in html?
I want to make a list where i have a heading with my Tag {{tag.name }} and then under the heading i want to display all posts with this tag. And that i want to do for every tag i have i tags.all. What is the best way to do that? My current Html file looks like this: <!-- Blog Entries Column --> <div class="containter"> <div class="row"> <div class="col-xs-12"> {% block sidebar %} {% include 'sidebar.html' %} {% endblock sidebar %} <div class="col-md-8 mt-3 left"> {% for post in post_list %} <div class="mycardstyle mb-4" > <div class="card-body"> <h2 class="card-title">{{ post.title }}</h2> <p class="card-text text-muted h6">{{ post.author }} | {{ post.created_on | date:"d M Y"}} | Tag: {% for tag in post.tags.all %} {% load app_tags %} <a class="mycardtext" href="{% url 'tag' tag.slug %}"> {{ tag.name }}({{ tag|count_tags_usage }})</a> {% empty %} None {% endfor %} </p> <p class="card-text">{{post.content|truncatewords:25|safe}}</p> <div><a href="{% url 'post_detail' post.slug %}" class="btn btn-outline-secondary">Weiterlesen</a> </div> </div> </div> Can i filter like {{ linux.tag }} ? I want to do something like: <div class="col-md-8 mt-3 left"> {% for post in post_list %} <div class="mycardstyle mb-4" > <div class="card-body"> <h1 class="card-title">{{ linux.tag }}</h1> <hr> <h1 class="card-title">{{ post.title }}</h1> .... -
Apache serving wrong Django project
I have created two Django projects,using virtualenv, and serving these two projects with Apache2 using wsgi and two virtual hosts on Ubuntu 18.04. If I configure both virtual hosts in one .conf file, then projects work fine, but if I split one .conf file in to two files, one for each virtual host then only first host (alphabetically) works, for second host, Apache tries to look for files in the folders of first Django project. I am using Ubuntu 18.04, with Python 3.6 and Django 2.2.2 with Apache 2.4.29. This problem is shared on blogs by different people and I tried those solution but nothing seems to work for me. Following single configuration file works fine: ServerName virenvtst.tst ServerAdmin webmaster@virenvtst.tst DocumentRoot /var/www/html Alias /static /home/raza/projects/virenvtest/static <Directory /home/raza/projects/virenvtest/static> Require all granted </Directory> <Directory /home/raza/projects/virenvtest/myproject> <Files wsgi.py> Require all granted </Files> </Directory> WSGIDaemonProcess myproject python-home=/home/raza/projects/virenvtest/virenvtestenv python-path=/home/raza/projects/virenvtest WSGIProcessGroup myproject WSGIScriptAlias / /home/raza/projects/virenvtest/myproject/wsgi.py <Location /> WSGIProcessGroup myproject </Location> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined vim: syntax=apache ts=4 sw=4 sts=4 sr noet ServerName djsample.tst ServerAdmin webmaster@djsample.tst DocumentRoot /var/www/html Alias /static /home/raza/projects/djsample/static <Directory /home/raza/projects/djsample/static> Require all granted </Directory> <Directory /home/raza/projects/djsample/mysite> <Files wsgi.py> Require all granted </Files> </Directory> WSGIDaemonProcess mysite python-home=/home/raza/projects/djsample/djsampleenv python-path=/home/raza/projects/djsample WSGIProcessGroup mysite WSGIScriptAlias / /home/raza/projects/djsample/mysite/wsgi.py <Location … -
I can't register a new user in my local django-oscar project
I have this django ecommerce project I am building using django-oscar. I followed the official documentation. everything seems to be working fine until I try to register or login through the site registration and login form. trying to login tells me: Oops! We found some errors - please check the error messages below and try again Please enter a correct username and password. Note that both fields may be case-sensitive. while trying to register throws an error saying: AttributeError at /accounts/login/ 'AnonymousUser' object has no attribute '_meta' both registration and login are not working since the user doesn't show in the admin panel after registration throws error and the login still wouldn't work even when I try logging in with a superuser account. (it only logs in when I explicitly login through the admin panel and only registers a user when I create a super user) this shouldn't be since I didn't fork the customer app, or is there something I'm missing? I'm running on windows 7, django==2.2.2, django-oscar==1.6.2, python==3.7.2 Below is my settings.py file import os from oscar.defaults import * BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '###########################################' DEBUG = True ALLOWED_HOSTS = [] from oscar import get_core_apps INSTALLED_APPS = [ … -
Django - Handle Image and Video posts as one type of post
For the sake of brevity, let's say we have the following two classes in models.py: class ImagePost(models.Model): image = models.ImageField(...) # other Image related fields class VideoPost(models.Model): video = models.FileField(...) # other Video related fields In the urls.py, I have urls that can be used to query either video or image posts. So, I can query them separately. But that is not what I want. What I want is the following functionality: When my application connects to the Django server, it should be able to query both post types such that the resulting queried data contains both types (e.g. sorted based on the timestamps). I want to display all types based on their creation time. My first thought was to put everything from both into one class like the following: class Post(models.Model): image = ... # all image related fields video = ... # all video related fields But that class has so many entries and somehow I do not like that solution. Does somebody have another solution that can be used in such a case ? -
Login in Ionic with backend django
I'm trying to make an application with django and ionic, it promises is that I want to login with django, and simply send the name and password by ionic, but the user's session is not kept open. if someone could tell me how to login from ionic with django's backend, as if it were in the browser so as not to lose the session #View Login in django def login_process_IONIC(request,user,password): print(usuario, clave) user = authenticate(username = usuario,password = clave) if user is not None: login(request,user) usuario_log = User.objects.get(username=user) perfil = { 'last_login':str(request.user.last_login), 'is_superuser':request.user.is_superuser, 'username':request.user.username, 'first_name':request.user.first_name, 'last_name':request.user.last_name, 'email':request.user.email, 'is_active':request.user.is_active, 'date_joined':str(request.user.date_joined), 'profile':{ 'country':request.user.Profile2.ubicacion, 'bio':request.user.Profile2.frase, 'image':request.user.Profile2.imagen, } } info_p = json.dumps(perfil) return HttpResponse(info_p) and this is in IONIC service login import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { usuario_actual_interface } from '../../models/login_interface'; import { MenuController } from '@ionic/angular'; import { AppComponent } from '../../app.component'; @Injectable({ providedIn: 'root' }) export class LoginService { mensaje:string; user_log:usuario_actual_interface; error_autent:string = null; constructor( private http:HttpClient ) { } logeologeo(user:string,password:string):Observable<usuario_actual_interface>{ return this.http.get<usuario_actual_interface>('http://192.168.1.68:8000/usuario/login_IONIC/'+user+'/'+password+'/') } } -
How to break a django app into microservices
So, I am new to this "monolith vs microservices" architecture debate and I have pretty much understood most of it. From my limited understanding I get it that in microservice architecture each feature(lets say) is a separate app. Now I need some clarification with respect to django for implementing microservices. Heres my question Should I make every microservice aka the app a different django project altogether OR should I make every app aka the microservice inside one django project and keep them isolated (as in loosely coupled) ? -
I want to pass a parameter isloggedin user to the django frontend
I am using viewsets and serializers to pass a list of users to the django frontend. I basically want to differentiate between currently logged in user info and other logged in user info -
How to access the values submitted in a form, perform an action using those values and returning a new page to user when submit button is clicked?
I am working on small Django app. I want to take the input values from the users using a form with 4 fields named love,need,money & good. I want to access those values and apply a function called Find_purpose() and return the pages based on the result from this function. I get two errors all the time given if the change the return render() indentation 1.The view purpose_finder.views.form_fill didn't return an HttpResponse object. It returned None instead. 2. result called before assignment I have used Find Purpose for the relative url to a new page called result.html but then I realised it is just another href link so it won't be any good. Then I used submit button but after it is not showing anything. My find_purpose() is working very fine when used with simple strings data and it returns a set that includes many intersections. forms.py from django import forms class FormName(forms.Form): need=forms.CharField(widget=forms.Textarea, label="Things Society Need") love=forms.CharField(widget=forms.Textarea, label="Things you love doing") money=forms.CharField(widget=forms.Textarea, label="Things that can earn you money") good=forms.CharField(widget=forms.Textarea, label="Things you are good at") this is for views.py from django.shortcuts import render from purpose_finder import forms from purpose_finder.functions import find_purpose def index(request): return render(request,'purpose_finder/index.html') def form_fill(request): form=forms.FormName() return render(request,'purpose_finder/form.html',{'form':form}) … -
Threads in Django Test Case are not closing DB Connections
I am trying to test out that the code I put in place to prevent race conditions is working. In my test case I've started two threads and have them both call the code in question. The threads return normally but it seems that the postgres database connections remain open. I've reduced the entire test case to a very simple example where the problem shows up: def test_threading(self): obj = mommy.make(self.model_class) def test_concurrency(): self.model_class.objects.get(id=obj.id) t1 = Thread(target=test_concurrency) t2 = Thread(target=test_concurrency) t1.start() t2.start() t1.join() t2.join() After the test runs and the test database is being destroyed I get the following error: psycopg2.errors.ObjectInUse: database "test_db" is being accessed by other users DETAIL: There are 2 other sessions using the database. I've tried manually closing the connections at the end of the test case by adding: for conn in db.connections.all(): conn.close() But this doesn't seem to have any effect. I am using django.test.TransactionTestCase as my base TestCase class, Django 2.2 and PostgreSQL 10.6. -
How to use a javascript variable within an html td id
In order to check cells in my table for whether they contain a value in javascript, it seems I need to give each td an id. I'll have thousands of cells, so typing out each td with its id isn't possible. Currently the trs with all the tds are generated with a loop in html, so with javascript I wanted to add a variable and stick it on the end of each id. I've managed to get a javascript variable into my html loop and it's correctly counting up, but my issue is getting it into the id="___" part. As shown in the code below, I've tried putting the document.write(i) line into the id, but it seems to treat it just as normal text. I've also put it in the output for DataEntryStatus just to prove that it's counting correctly, starting at 1 and increasing with each new row. <table class="table" id="table_id"> <tr> <th style="color:#ddd">fffffffffffffff<br>f<br>f<br>f</th> <th style="vertical-align:bottom;">Data Entry Status</th> <th style="vertical-align:bottom;">Tool</th> </tr> <tbody id="myTable"> <script> var i = 1; </script> {% for item in items %} <tr> <td> <a href="{% url 'edit_newcuts' item.pk %}" class="btn btn-primary btn-sm" role="button">Edit</a> <a href="{% url 'delete_newcuts' item.pk %}" class="btn btn-danger btn-sm" role="button">! X !</a> … -
how to disable few choice field items from dropdown field, according to the user data provided in or not int the field above the choice field
i have a form which got 4 fields , i want to disable few items from the last two fields (which are dropdown list) ,according to the data given by the user in 2nd field. forms.py class EditForm(forms.Form): status = [('pending','Pending'), ('published','Published'), ('ready to upload','Ready to upload'), ('uploaded but not published','Uploaded but not published')] p_status = [('pending','Pending'), ('approved', 'Approved'), ('rejected','Rejected')] link = forms.URLField(required=False,widget=forms.URLInput(attrs={'class':''})) promotion_status = forms.CharField(widget=forms.Select(choices=status)) partner_status = forms.CharField(widget=forms.Select(choices=p_status)) if link is filled by user then 'published' from status and 'rejected' from p_status is disabled. i have tried if else statements but not working. plz help -
Django Redis Websocket 404
We run a Ubuntu 18.04 server with Django, django-channels, channels_redis and redis-server installed. The goal is to use redis as a websocket, but I can't get it to work, JS shows the error WebSocket connection to 'ws:/IP_ADDRESS/ws/control/' failed: Error during WebSocket handshake: Unexpected response code: 404 My redis config contains two binds on the default port 6379: bind IP_ADDRESS bind 127.0.0.1 port 6379 protected-mode no The channels config (settings.py) is pretty much on default, using the IP_ADDRESS and the port (I tried this with 'localhost' and '127.0.0.1' --> same result). I furthermore tried: restarting every single component reinstalling all dependencies and the virtualenv using another port turning off the ufw firewall (even though it is configured to allow connections on this port) using another browser It worked fine on Windows with a redis-server docker container, so I think it's not a problem of the routing.py or some JS code. -
How do I handle real time search of a database in a Django web app?
I want to build a web app where a user is brought to a webpage with a search bar, and upon every keystroke the results of the search should be displayed below the search bar. What I have done so far is setup some javascript code to hide and display HTML list elements upon every key stroke, but this isn't exactly searching the database. I suppose I could list the whole database (about 500 objects and growing) in the HTML code and then filter it with Javascript, but I feel like this is inefficient? A couple of ideas that I have that might work: 1) What I just described above. List the whole database in HTML and filter using javascript. 2) Algolia or elasticsearch search framework? I tried working with both of these and couldn't seem to get them to work. How should I go about doing this in your opinion? I'm new to web development and i'm unsure what is the best route to take. Thank you for any help! -
Can't enter checkbox values in Django Database
Hello everyone I have been working a simple form for days and I am finding it hard to checkbox values in a Django Database the error message I get when I click on the submit button is this 'Value "['absu', 'futo']"' is not a valid choice below are my codes. url.py file from django.conf.urls import url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from img_app import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^form/', views.form, name='form'), url(r'^text_form/', views.text_form, name='text_form'), url(r'^show/', views.show, name='show'), url(r'^thanku/', views.thanks, name='thanks'), url(r'^another/', views.another_form, name='another_form'), url(r'^contact/', views.contact, name='contact'), url(r'^select/', views.select, name='select'), url(r'^admin/', admin.site.urls), ] models.py file from django.db import models class MultiSelect(models.Model): CHECKBOX_CHOICES = [ ('imsu', 'IMSU'), ('absu', 'ABSU'), ('futo', 'FUTO'), ('uniben', 'UNIBEN'), ] name = models.CharField(max_length=50) email = models.EmailField() education = models.CharField(max_length=5, choices=CHECKBOX_CHOICES) message = models.TextField() def __str__(self): return name forms.py file from django import forms from img_app.models import ContactModel, MultiSelect class MultiSelectForm(forms.ModelForm): CHECKBOX_CHOICES = [ ('imsu', 'IMSU'), ('absu', 'ABSU'), ('futo', 'FUTO'), ('uniben', 'UNIBEN'), ] education = forms.CharField(widget=forms.CheckboxSelectMultiple(choices=CHECKBOX_CHOICES)) class Meta(): model = MultiSelect fields = '__all__' views.py file from django.shortcuts import render from django.http import HttpResponseRedirect from img_app.forms import MultiSelectForm def select(request): if request.method == 'POST': mult = MultiSelectForm(request.POST) if mult.is_valid(): … -
I want to custom CSS of my django-dashing, all widgets
I want to add css in django-dashing for override all widget. I tried follow this doc https://django-dashing.readthedocs.io/en/latest/getting-started.html#template-file But I don't understand : "Also make sure the app which hosts the dashing/dashboard.html template is listed before dashing in INSTALLED_APPS, since you are overriding the default template." => I don't have a "hosts", i have just css file... I create files : dashing/dashboard.html dashing/css/global.css And I fill dashboard.html : {% extends 'dashing/base.html' %} {% load staticfiles %} {% block stylesheets %} <link rel="stylesheet" href="{% static 'css/global.css' %}"> {% endblock %} -
Upgrading to Django 1.11.20 from 1.8.11 i have come across this issue that looks to be something to do with the forms/widgets
I have recently updated from 1.8 to 1.11 i have cleaned up most errors and issues but i have several unit tests related to a upload form that is now getting the issue ValueError: too many values to unpack (expected 2) I have upgraded from django-widgets-tweaks 1.4.1 to 1.4.5 Traceback (most recent call last): File "/data/winda/trainings/tests/test_single_upload.py", line 118, in test_post_empty response = self.client.post(self.url, data=data) File "/usr/local/lib/python3.6/dist-packages/django/test/client.py", line 548, in post secure=secure, **extra) File "/usr/local/lib/python3.6/dist-packages/django/test/client.py", line 350, in post secure=secure, **extra) File "/usr/local/lib/python3.6/dist-packages/django/test/client.py", line 416, in generic return self.request(**r) File "/usr/local/lib/python3.6/dist-packages/django/test/client.py", line 501, in request six.reraise(*exc_info) File "/usr/local/lib/python3.6/dist-packages/django/utils/six.py", line 686, in reraise raise value File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py", line 217, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py", line 215, in _get_response response = response.render() File "/usr/local/lib/python3.6/dist-packages/django/template/response.py", line 107, in render self.content = self.rendered_content File "/usr/local/lib/python3.6/dist-packages/django/template/response.py", line 84, in rendered_content content = template.render(context, self._request) File "/usr/local/lib/python3.6/dist-packages/django/template/backends/django.py", line 66, in render return self.template.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 207, in render return self._render(context) File "/usr/local/lib/python3.6/dist-packages/django/test/utils.py", line 107, in instrumented_test_render return self.nodelist.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) … -
How to pass the user token for API testing in django rest framework?
I'm writing some tests to check the connection to my API. I've put in place identification via tokens and I am successful with retrieving a token for a specific test user with : token = Token.objects.get(user__username='testuser') What I'm struggling with is to use that token to create a successful API request as this one : client = APIClient(HTTP_AUTHORIZATION='Token ' + token.key) response = client.get('/patientFull/1/',headers={'Authorization': 'Token ' + token.key}) I have been looking at many ways to make this work and these are some ways I tried to do it : response = requests.get('http://127.0.0.1:8000/patientFull/1/',headers={'Authorization': 'Token ' + token.key} ) client = APIClient() client.credentials(HTTP_AUTHORIZATION='Token ' + token.key) response = client.get('/patientFull/1/') The test is a simple assert to check response has a 200 OK HTTP answer from the server. All of these ways above returns a 403 HTTP response. here's the full code of my test (I'm using fixtures to populate my test database with testing data): import json import requests from rest_framework.authtoken.models import Token from rest_framework.test import APIRequestFactory, APITestCase, APIClient class CustomerAPITestBack(APITestCase): fixtures = ['new-fixtures.json'] def testDE(self): token = Token.objects.get(user__username='jpmichel') client = APIClient(HTTP_AUTHORIZATION='Token ' + token.key) response = client.get('/patientFull/1/',headers={'Authorization': 'Token ' + token.key}) self.assertEqual(200, response.status_code) I have configured my settings.py file as … -
Unable to override model save()
Trying to execute some code when the Profile model gets updated but it appears the save method never gets called as the print statement never shows. Profile.objects.filter(user__id=1).update(field_a='test') models.py class Profile(models.Model): def save(self, *args, **kwargs): print("Test") super(Profile, self).save(*args, **kwargs) -
Do I need NGINX in Kubernetes for Flask/Django deployment?
So I have a bunch of flask apps and a bunch of django apps that need to be thrown onto K8s to then communicate together. Now, I understand I need a WSGI server on each of the containers I deploy. However do I need to deploy an NGINX container to forward the requests to the WSGI servers, or can I just deploy the pods containing the containers inside the service and the service will sort it out? -
django: invalid syntax path('details/<int:id>/', views.details, name='details')
views.py file def details(request, id): post = Posts.objects.get(id=id) context = { 'post': post } return render(request, 'posts/details.html', context) urls.py file from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index') path('details/<int:id>/', views.details, name='details') ] path('details//', views.details, name='details') ^ SyntaxError: invalid syntax -
ModuleNotFoundError: No module named 'app.wsgi'
I am trying to upload a django app in heroku but when test locally using heroku local it gives me an error ModuleNotFoundError: No module named 'stockDataProject.wsgi' I understand that my Procfile does not target to the relevent WSGI file but I do not know how to do it My app is organized in the following: DjangoAPP ----- projectEnvironment ----- stockDataProject ---------- manage.py ---------- requirements.txt ---------- stockDataProject -------------- urls.py -------------- wsgi.py -------------- settings.py ----- db.sqlite3 ----- git ----- gitignore ----- Procfile and my Procfile:web: gunicorn stockDataProject.wsgi --log-file - howcnI solve this issue ? -
Django Template if/else Statement Throwing Error [duplicate]
This question already has an answer here: Any way to make {% extends '…' %} conditional? - Django 4 answers I get the following error: Invalid block tag on line 5: 'else'. Did you forget to register or load this tag? for the following template code: {% load staticfiles %} {% if user.is_superuser %} {% extends "superuser_base.html" %} {% else %} {% extends "quality_home/quality_dept_base.html" %} {% endif %} I realize similar questions have been asked, but as far as I can tell, my syntax is correct, which eliminates most previously asked questions. -
Exposing GraphQL based APIs
I have data stored in file system and I have exposed python APIs to read/write data from file system. Now I want to expose these APIs as GraphQL APIs and use some Python server. Is Django/Django REST framework a right choice for this? I am new to Django and GraphQL both and want to understand what all technologies I should learn without wasting time on reading unnecessary technologies. Any suggestions here are highly appreciable. -
How to implement Add to WishList for a Product in Django?
I am implementing an app in which a User can create a Shopping List and can search for a Product and add the Product to the Shopping List. I am stuck at the 'how to add to the list' part. I have created the Model as follows: class Product(models.Model): pid = models.IntegerField(primary_key=True) name = models.CharField(max_length=100, db_index=True) description = models.TextField(blank=True) def __str__(self): return self.name def get_absolute_url(self): return reverse('shop:product_detail', args=[self.pid, self.slug]) class ShoppingList(models.Model): user = models.ForeignKey(User, related_name='shoplist', on_delete=models.CASCADE) list_name = models.CharField(max_length=20) items = models.ManyToManyField(Product) slug = models.SlugField(max_length=150, db_index=True) def __str__(self): return self.list_name def get_absolute_url(self): return reverse('shop:item_list', args=[self.slug]) In the Template to view each Product, I have the following <h3>{{ product.name }}</h3> <a href="(What is to be written here)">ADD</a> I need the Particular product which I am displaying through the get_absolute_url, to be Added to the Shopping List, when the ADD button is cliked. I am lost as to what Steps to take next. Please help. -
TypeError: verify_file() got an unexpected keyword argument 'data_filename' (GNUPG)
I am working with gnupg in a PythonAnywhere-Django environment to run Mayan EDMS. I recently changed from using python-gnupg to the standard gnupg as to finally overcome OSErrors. However, I have found out that some syntax needs to be changed due to this process (i.e., gnupghome>homedir; gpgbinary>binary, etc.). Has anyone ever encountered the correct replacement for data_filename in the verify_file command for gnupg? I have been browsing online for some time and have seen users only inputting two arguments, as opposed to the three I use now. The file name is vital to my code. Traceback 2019-06-13 07:22:26,695: Unexpected exception while trying to create version for new document "testassayform.xlsx" from source "Default"; verify_file() got an unexpected keyword argument 'data_filename' Traceback (most recent call last): File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/mayan/apps/sources/models/base.py", line 128, in upload_document file_object=file_object, _user=user, File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/mayan/apps/documents/models/document_models.py", line 160, in new_version document_version.save(_user=_user) File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/mayan/apps/documents/models/document_version_models.py", line 291, in save document_version=self File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/django/db/models/manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/django/db/models/query.py", line 394, in create obj.save(force_insert=True, using=self.db) File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/mayan/apps/document_signatures/models.py", line 111, in save file_object=file_object File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/mayan/apps/django_gpg/managers.py", line 118, in verify_file file_object=file_object, keys=keys File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/mayan/apps/django_gpg/classes.py", line 120, in verify_file keys=keys, data_filename=data_filename File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/mayan/apps/django_gpg/classes.py", line 82, in gpg_command result = function(gpg=gpg, **kwargs) File "/home/mywebsite/.virtualenvs/env/lib/python3.7/site-packages/mayan/apps/django_gpg/classes.py", line …