Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
AppleOAuth2() is giving error __init__() takes at least 2 arguments (1 given). What is the argument which needs to be passed here?
class AppleOAuth2(BaseOAuth2): """apple authentication backend""" name = 'apple' ACCESS_TOKEN_URL = 'https://appleid.apple.com/auth/token' SCOPE_SEPARATOR = ',' ID_KEY = 'uid' -
How to add the result of a custom query to the Django Admin Site change_form template?
My web application manages hospitalizations and specialist examinations. Some of these exams may have been performed during a hospitalization, but I have no connection between the hospitalizations and the specialist exams. When the user modifies the data of an exam, I would like him to see at the bottom of the page all the admissions started before the exam and finished after the exam, because one of them could be the admissions where the exam was taken. How can I show the result of the query described above at the bottom of the "change_form" template of the Django Admin Site? Thanks in advance. -
Serialize dictionary to JSON in DRF
I have a method associated with the Statistic model returning the dictionary: def get_user_statistics(self, user): ... return { 'week_right: week_right, 'week_wrong': week_wrong, 'week_near' : week_near, 'days': days, 'day_right': day_right, 'day_wrong': day_wrong, 'day_near': day_near } where day_right, day_wrong, day_near and days are lists. I would like to send the result of this method in the form of JSON to the application written in Rect. However, when method get in generics.RetrieveAPIView looks like below: def get(self, request, *args, **kwargs): user = self.request.user user_stats = Statistic.objects.get_user_statistics(user) serializer = json.dumps(user_stats, cls=DjangoJSONEncoder) return Response(serializer) This Response is a simple string and I have to use JSON.parse JavaScript to process it. Is there any other way to serialize my dictionary to avoid using JSON.parse? -
Python Crash Course new_entry.save() causing me errors
So I'm following a book called Python Crash Course. And I'm currently working on its Django project, and I am encountering a problem that's apparently in the views.py. Here is the entire code for views.py: from django.shortcuts import render from django.http import HttpResponseRedirect, Http404 from django.http import HttpResponseRedirect from django.urls import reverse from django.contrib.auth.decorators import login_required from .models import Topic, Entry from .forms import TopicForm, EntryForm def index(request): return render(request, 'learning_logs/index.html') @login_required def topics(request): topics = Topic.objects.filter(owner=request.user).order_by('date_added') context = {'topics': topics} return render(request, 'learning_logs/topics.html', context) @login_required def topic(request, topic_id): topic = Topic.objects.get(id=topic_id) if topic.owner != request.user: raise Http404 entries = topic.entry_set.order_by('-date_added') context = {'topic': topic, 'entries': entries} return render(request, 'learning_logs/topic.html', context) @login_required def new_topic(request): if request.method != 'POST': form = TopicForm() else: form = TopicForm(data=request.POST) if form.is_valid(): new_topic = form.save(commit=False) new_topic.owner = request.user new_topic.save() form.save() return HttpResponseRedirect(reverse('learning_logs:topics')) context = {'form': form} return render(request, 'learning_logs/new_topic.html', context) @login_required def new_entry(request, topic_id): topic = Topic.objects.get(id=topic_id) if request.method != 'POST': form = EntryForm() else: form = EntryForm(data=request.POST) if form.is_valid(): new_entry = form.save(commit=False) new_entry.topic = topic new_entry.save() return HttpResponseRedirect(reverse('learning_logs:topic', args=[topic_id])) context = {'topic': topic, 'form': form} return render(request, 'learning_logs/new_entry.html', context) @login_required def edit_entry(request, entry_id): entry = Entry.objects.get(id=entry_id) topic = entry.topic if topic.owner != request.user: raise … -
How to run a function in Django after a certain time passed by
Having the model of Station with the below fields: class Station(models.Model): is_available = models.BooleanField(default=True) unavailable_until = models.DateTimeField(null=True,blank=True) I can define until when my station is unavailable by giving a DateTime value , so when that action happens the is_available value turns to False. I want to turn the is_available value to True every time the unavailable_until value passed by(comparing with the current time based on the timezone). How can I achieve an automation like this? Imagine that I have a lot of Station records which belong to station owners which can update the availability (assign new unavailable_until value if passed by) whenever they want. I think the logic could be something like: def turn_availability_to_true(station): if (station.unavailable_until < current_time): station.is_available = True But how can I implement a function like this to be called by its own when the unavailable_until value passed by? -
Two forms on the same model, pb save
I'm a beginner in django, and my code is not yet factorized I have a problem during registration or update, delivery address overwrites billing address ? forms.py ------------------------------------------------------- class AddressForm(ModelForm): class Meta: model = Address fields = ( 'address', 'address2', 'zipcode', 'city', 'country', 'phone1', 'phone2', ) class AddressDeliveryForm(ModelForm): class Meta: model = Address fields = ( 'address', 'address2', 'zipcode', 'city', 'country', 'phone1', 'phone2', )' views.py--------------------------------------------------------------- @login_required(login_url="index") def updateCustomer(request, pk): customer = Account.objects.get(id=pk) addressbilling = address.objects.get(users_id=pk,delivery_address=False) addressdelivery = address.objects.get(users_id=pk,delivery_address=True) account_form = AccountForm(instance=customer) address_form = AddressForm(instance=addressbilling) addressdelivery_form = AddressDeliveryForm(instance=addressdelivery) if request.method == "POST": account_form = AccountForm(request.POST, request.FILES, instance=customer) address_form = AddressForm(request.POST, request.FILES, instance=address) addressdelivery_form = AddressDeliveryForm(request.POST, request.FILES, instance=addressdelivery) if account_form.is_valid() and address_form.is_valid() and addressdelivery_form.is_valid(): account_form.save() address_form.save() addressdelivery.save() return redirect('console_admin:list_customer') context = { 'account_form': account_form, 'address_form': address_form, 'addressdelivery_form': addressdelivery_form, 'customer' : customer.id } return render(request, 'console_admin/customer_form.html',context) -
Why I'm getting "Request failed with status code 404"
views.py class SearchTodo(viewsets.ModelViewSet): serializer_class = todoserializer def get_queryset(self): status = self.kwargs["status"] return JsonResponse({"data":Todo.objects.filter(status=status)}, content_type='application/json') urls.py for rest framework router = routers.DefaultRouter() router.register(r"^todo/(?P<status>\w+)$",views.SearchTodo,"SearchTodo") router.register(r"todo",views.todoview,"todor") urlpatterns = [ path('admin/', admin.site.urls), path("api/",include(router.urls)) ] Axios code for filter object which has the status True const data = () => { axios .get(`http://127.0.0.1:8000/api/todo/True`) .then((res) => settasks(res.data)) .catch((error) => alert(error.message)); }; but whenever this function run I got a 404 bad request error where I'm getting wrong. -
Test password protected page django
I want to write test cases about password-protected pages. I have /management/edit page. it is loginrequired page. My test case currently likes below, but it is failed. I am expecting to get 200 but instead of I got redirection(302) Tests.py from django.test import TestCase, Client # Admin panel Test cases class PageTest(TestCase): # it will redirect user to loginpage def test_admin_page(self): response = self.client.get("/management/") self.assertEquals(response.status_code, 302) def test_edit(self): c = Client() c.login(username='admin', password='admin') response = c.get("/management/edit/") self.assertEquals(response.status_code,200) -
Markup Deprecated issue finding compatible textile
I'm updating Django project to the latest version, since django markup is deprecated I'm using it's replacement django-markup-deprecated It's throwing an error of missing textile for python File "/home/sam/code/envs/kpsga/lib/python3.8/site-packages/markup_deprecated/templatetags/markup.py", line 27, in textile raise template.TemplateSyntaxError("Error in 'textile' filter: The Python textile library isn't installed.") django.template.exceptions.TemplateSyntaxError: Error in 'textile' filter: The Python textile library isn't installed. [28/Oct/2020 14:15:29] "GET / HTTP/1.1" 500 166483 so I tried to install it this way pip install textile which doesn't work and throws a different incompatibility issue File "/home/sam/code/envs/kpsga/lib/python3.8/site-packages/markup_deprecated/templatetags/markup.py", line 30, in textile return mark_safe(force_text(textile.textile(force_bytes(value), encoding='utf-8', output='utf-8'))) TypeError: textile() got an unexpected keyword argument 'encoding' [28/Oct/2020 14:18:31] "GET / HTTP/1.1" 500 160593 -
OSError: Cannot load native module 'Crypto.Cipher._raw_ecb' on Apache mod_wsgi CentOS 8
I'm trying to run a django project on an apache server. The django server runs fine on its own but fails when running through mod_wsgi. It returns the error as follow : OSError: Cannot load native module 'Crypto.Cipher._raw_ecb': Trying '_raw_ecb.cpython-39-x86_64-linux-gnu.so': /home/user/django/centos_env/lib/python3.9/site-packages/Cryptodome/Util/../Cipher/_raw_ecb.cpython-39-x86_64-linux-gnu.so: failed to map segment from shared object, Trying '_raw_ecb.abi3.so': /home/user/django/centos_env/lib/python3.9/site-packages/Cryptodome/Util/../Cipher/_raw_ecb.abi3.so: cannot open shared object file: No such file or directory, Trying '_raw_ecb.so': /home/user/django/centos_env/lib/python3.9/site-packages/Cryptodome/Util/../Cipher/_raw_ecb.so: cannot open shared object file: No such file or directory I checked that the file were there. I checked Python home variable and tried to import Crypto.Cipher from the python interpreter(which worked). Everything seems fine. I tried to compile pycryptodome from source but it didn't help either. -
How to override Django get_search_results method in ModelAdmin, while keeping filters working as expected?
I have a Model admin where I override get_search_result this way def get_search_results(self, request, queryset, search_term): queryset, use_distinct = super(OccupancyAdmin, self).get_search_results( request, queryset, search_term ) search_words = search_term.split(",") if search_words: q_objects = [ Q(**{field + "__icontains": word}) for field in self.search_fields for word in search_words ] queryset |= self.model.objects.filter(reduce(or_, q_objects)) return queryset, use_distinct The suggestion comes from here: Is there a way to search for multiple terms in admin search? django The problem I am facing is the following: neither the DateTimeRangeFilter from rangefilter nor my custom SimpleListFilter work as expected anymore. The filters seem like being disabled. I looked at the SQL queries being performed and they seem alright. I am pretty sure I am messing up with the querysets somehow but don't know how to debug this. -
Django: Avoid duplicates image uploads from admin panel
I have a model with an ImageField, which allow an image upload from the panel admin of Django. I would like to check if the image already exists, before saving the model. If it's the case, I would like to display a popup (or a warning on the same page) with both images, to allow users to compare images, and allow saving if it's a false positive. For the image comparison, I'm going to use imagehash.average_hash() algorithm which gave me good results from my tests. So my questions are: How to get the file content (to compute the aHash), before the model save. How to display a popup or modify the modelAdmin page to allow the check of false positive. Any help is appreciated! -
How to count the value of dictionary using queryset in django
I used .value('post_id') in django to bring the following values. <QuerySet [{'post_id': 3}, {'post_id': 2}, {'post_id': 1}, {'post_id': 3}]> If you count the value of each dictionary, you will have one, one, and two, respectively. Which queryset should I look for, instead of counting it as a queryset without for loop ? -
Django - very slow annotation when annotation more than 1 field
I'm building a chat functionality for my django app. I made Message model, which looks like this: class Message(models.Model): sender = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, related_name='messages_sent', blank=True, null=True) receiver = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, related_name='messages_received', null=True) message = models.TextField(blank=True) created_at = models.DateTimeField(auto_now_add=True, db_index=True) Now I want to create a view with a list of users, ordered by the last message date with currently logged in user. def get_queryset(self): qs = UserModel.objects.all() user = self.request.user # exclude self qs = qs.exclude(pk=user.pk) qs = qs.annotate(last_sent_date=Max("messages_received__created_at", filter=Q(messages_received__sender=user))) qs = qs.annotate(last_received_date=Max("messages_sent__created_at", filter=Q(messages_sent__receiver=user))) qs = qs.annotate(last_message_date=Greatest('last_sent_date', 'last_received_date')) qs = qs.annotate(has_messages=Case( When(Q(last_received_date__isnull=False) | Q(last_sent_date__isnull=False), then=True), default=False, output_field=BooleanField() )) return qs.order_by(F('last_message_date').desc(nulls_last=True)) This was working very well, until I created many Message objects for 2 test users, each of them had 8k sent and 8k received messages (16k total). This slowed down the query significantly, and now it takes even 40-50 seconds (for small amounts it was below 500ms). After some investigation I discovered that the main problem is in those lines: qs = qs.annotate(last_sent_date=Max("messages_received__created_at", filter=Q(messages_received__sender=user))) qs = qs.annotate(last_received_date=Max("messages_sent__created_at", filter=Q(messages_sent__receiver=user))) Separately, they are very fast, but combined they are creating a very slow query. Is there some better way to annotate Max value from 2 fields or a way to annotate this … -
i want to get all categories filter as dropdown and want to show results
I am building an admin panel where i want to add filter system. For that I installed django-filters in system.py file and run the command to install it after that I did these below filter.py file: import django_filters from .models import * class ProductFilter(django_filters.FilterSet): class Meta: model = ProductModel fields = ['product_category'] views.py file: def createproduct(request): if request.method == 'POST': createProd = ProductForm(request.POST, request.FILES, request.GET) if createProd.is_valid(): # p_id = createProd.cleaned_data['product_id'] p_name = createProd.cleaned_data['product_name'] p_sku = createProd.cleaned_data['product_sku'] p_tags = createProd.cleaned_data['product_tags'] p_category = createProd.cleaned_data['product_category'] p_image = createProd.cleaned_data['product_image'] p_brand = createProd.cleaned_data['product_brand'] p_desc = createProd.cleaned_data['product_desc'] p_price = createProd.cleaned_data['product_price'] insert_products = ProductModel(product_name=p_name, product_sku=p_sku, product_tags=p_tags, product_category=p_category, product_image=p_image, product_brand=p_brand, product_desc=p_desc, product_price=p_price) insert_products.save() create = ProductForm() else: createProd = ProductForm() all_products = ProductModel.objects.all() product_filter = ProductFilter( request.GET, queryset=all_products) all_products = product_filter.qs return render(request, 'create.html', {'create': createProd, 'all_prods': all_products, 'product_filter': product_filter}) I wrote this code for filtering functionality : all_products = ProductModel.objects.all() product_filter = ProductFilter( request.GET, queryset=all_products) all_products = product_filter.qs return render(request, 'create.html', {'create': createProd, 'all_prods': all_products, 'product_filter': product_filter}) This is my models.py class ProductModel(models.Model): product_id = models.AutoField(primary_key=True) product_name = models.CharField(max_length=100) product_sku = models.CharField(max_length=200) product_tags = models.CharField(max_length=100) product_category = models.CharField( max_length=1000, default="Uncategorized") product_image = models.ImageField(upload_to='images/') product_brand = models.CharField(max_length=100) product_desc = models.TextField(max_length=255) product_price = models.CharField(max_length=100) So,after writing these codes … -
Django not accepting from that JavsScript has inserted a value into
I have a Django form uses FormBuilder.js. The intent is to use the JSON recieved from FormBuilder and have that JSON inserted into the JSON [Django] field using vanilla JavsScript (by directly setting it's .value). Django does not validate the form when using this method. However, if I hard type the JSON, or when the form fails and I return back to the page immediately, the form will validate. I have looked into the form itself on POST and the data is no different via any methods. Does anyone have a clue what's going on? -
How to create a Dynamic upload path Django
I have a Django rest api that converts user uploaded video to frame using Opencv. I also have a function upload_to that creates a dynamic path for the uploaded video. I want to write the frames from the video into the upload_to folder. I tried cv2.imwrite(os.path.join(upload_to,'new_image'+str(i)+'.jpg'),frame) but it yield an error. def upload_to(instance, filename): now = timezone.now() base, extension = os.path.splitext(filename.lower()) return f"SmatCrow/{instance.name}/{now:%Y-%m-%d}{extension}" Opencv script def video_to_frame(video): now = timezone.now() cap= cv2.VideoCapture(video) i=1 while(cap.isOpened()): ret, frame = cap.read() if ret == False: break if i%10 == 0: cv2.imwrite(('media/SmatCrow/new_image'+str(i)+'.jpg'),frame) i+=1 cap.release() cv2.destroyAllWindows() My model.py class MyVideo(models.Model): name= models.CharField(max_length=500) date = models.DateTimeField(auto_now_add=True) videofile= models.FileField(upload_to=upload_to) def __str__(self): return self.name + ": " + str(self.videofile) def save(self, *args, **kwargs): super(MyVideo, self).save(*args, **kwargs) tfile = tempfile.NamedTemporaryFile(delete=False) tfile.write(self.videofile.read()) vid = video_to_frame((tfile.name)) -
How to encrypt DjangoRESTFramework SimpleJWT's?
is there a way to encrypt the tokens the simple JWT backend for DRF creates? I want to store them as cookies, so want them to be obscured. Additionally, is it appropriate to name the cookies "refresh" and "access" in the browser? -
django form resubmitted upon refresh when using context_processors
I'm trying on creating a user registration form and able to succeed with the registration process and validation. The form is handled using context_processor because the form is on the base.html and in inside a modal. Upon submission, I need to redirect to the current page the user is in and it works. But my form keeps re-submitting upon refresh. context_processor.py def include_registration_form(request): form = CreateUserForm() if request.method == 'POST': form = CreateUserForm(request.POST) if form.is_valid(): form.save() user = form.cleaned_data.get('username') messages.success(request, 'Account was created for {}. Now you can sign in.'.format(user)) else: messages.error(request, "Something went wrong. Account not created!") context = { 'registration_form': form, } return context forms.py class CreateUserForm(UserCreationForm): first_name = forms.CharField(required=True) last_name = forms.CharField(required=True) email = forms.EmailField(required=True) class Meta: model = User fields = ['username', 'first_name', 'last_name', 'email', 'password1', 'password2'] url patterns urlpatterns = [ path('admin/', admin.site.urls), path('', views.home, name='index'), path('menu', views.menu, name='menu'), path('promo', views.promo, name='promo'), ] template(base.html) <form class="needs-validation" action="" method="post" novalidate> {% csrf_token %} {% for field in registration_form %} <div class="col-sm"> <label>{{ field.label }}</label> {% if registration_form.is_bound %} {% if field.errors %} {% render_field field class="form-control form-control-sm is-invalid" %} {% if field.name == 'username' or 'password1' %} <small> {{ field.help_text }} </small> {% endif %} <div … -
why django-mptt do not render children correctly
I'm developing a web app in Python3.7 with django (3.1.2). I would like to create app which will lists folders and files under some path. I would like to use django.mptt to do it. I have path declared in my settings.py: MAIN_DIRECTORY = r'D:\imgs' I created following model: class Folder(MPTTModel): name = models.CharField(max_length=30, unique=True) parent = TreeForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='children') class MPTTMeta: order_insertion_by = ['name'] and view: class MainView(TemplateView): template_name = "main.html" def get_directories(self): path = settings.MAIN_DIRECTORY self.tree = self.get_folder_from_db(path, None) for root, dirs, files in os.walk(path): if root == path: continue root_folder = self.get_folder_from_db(name=root, parent=self.tree) for d in dirs: if os.path.isdir(d): tmp = self.get_folder_from_db(name=d, parent=root_folder) def get_folder_from_db(self, name, parent): try: obj = Folder.objects.get(name=name, parent=parent) except Folder.DoesNotExist: obj = Folder(name=name, parent=parent) obj.save() return obj def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) self.get_directories() context['tree'] = [self.tree] return context and of course I have template (copied from mptt tutorial): {% extends 'base.html' %} {% load mptt_tags %} {% block content %} <h2>Main page</h2> <ul class="root"> {% recursetree tree%} <li> {{ node.name }} {% if not node.is_leaf_node %} <ul class="children"> {{ children }} </ul> {% endif %} </li> {% endrecursetree %} </ul> {% endblock %} I know that te tree structure is correct, … -
NOT ABLE TO RETURN TABLE IN DJANGO TEMPLATES USING PYTHON
I wrote a code in python to get stock data and return it inside html page in Django. I want to view it in table format in html page, Plz suggest how to call my python code in html webpage so that it will show output in html -
How can i filter a models property in django?
im quite new in backend development so i got a basic question. I've three different models one named Campaigns; class Campaigns(models.Model): channel = models.ForeignKey(Channels, blank=False, verbose_name="Channel Name", on_delete=models.CASCADE) campaign_name = models.CharField(max_length=255, blank=False, verbose_name="Campaign Name") Second one is; class CampaignDetails(models.Model): channel = models.ForeignKey(Channels, blank=False, null=True, verbose_name="Channel Name", on_delete=models.CASCADE) name = models.ForeignKey(Campaigns, blank=False, null=True, verbose_name="Campaign", on_delete=models.CASCADE) And the last one is; Class Channels(models.Model): name = models.CharField(max_length=50, null=False, blank=False, verbose_name="Tv Channel") I want to filter name in CampaignDetails by channel. Like if i choose channel 1 i want to filter name by campaign names that under that channel. How can i manage that? Any help is appreciated, thank you. -
my mysqlclient is not installing and it throws this error...someone help. am new to code btw
Collecting mysqlclient Using cached mysqlclient-2.0.1.tar.gz (87 kB) ERROR: Command errored out with exit status 1: command: /home/moonguy/Documents/smartbill/virtual/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lp9dtwz6/mysqlclient/setup.py'"'"'; file='"'"'/tmp/pip-install-lp9dtwz6/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-m1qj8ead cwd: /tmp/pip-install-lp9dtwz6/mysqlclient/ Complete output (12 lines): /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-lp9dtwz6/mysqlclient/setup.py", line 15, in metadata, options = get_config() File "/tmp/pip-install-lp9dtwz6/mysqlclient/setup_posix.py", line 65, in get_config libs = mysql_config("libs") File "/tmp/pip-install-lp9dtwz6/mysqlclient/setup_posix.py", line 31, in mysql_config raise OSError("{} not found".format(_mysql_config_path)) OSError: mysql_config not found ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. -
How to override serializers save method in django rest?
Here I have only one view for saving two serializer models. Now While saving the RegisterSerializer UserLogin serializer is also saving. But now what I want to change is, I want to change the status of is_active in UserLogin to True automatically without user input while saving the searializers. I don't want to change it to default=True at model. serializers class UserloginSerializer(serializers.ModelSerializer): class Meta: model = UserLogin fields = ['m_number'] class RegisterSerializer(serializers.ModelSerializer): user_login = UserloginSerializer() #...... class Meta: model = User fields = ['user_login',..] models class Memberlogins(models.Model): is_active = models.BooleanField(default=False) m_number = models.CharField(max_length=255, blank=True, null=True) views class RegisterView(APIView): serializer = RegisterSerializer def post(self, request): context = {'request': request} serializer = self.serializer(data=request.data,context) if serializer.is_valid(raise_exception=True): serializer.save() -
403 Forbidden You don't have permission to access this resource. - Django
I recently made some changes to my Django app and pulled them back to the server. After doing so I am experiencing some error messages when trying to access my website. When I visit the website I am given Forbidden You don't have permission to access this resource. and in my /var/log/apache2/portfolio-error.log i see the following error logs. [Wed Oct 28 08:51:06.883684 2020] [core:error] [pid 11345:tid 139674953709312] (13)Permission denied: [client xx.xx.xxx.xx:48690] AH00035: access to / denied (filesystem path '/svr/portfolio/portfolio') because search permissions are missing on a component of the path [Wed Oct 28 08:51:07.085543 2020] [core:error] [pid 11345:tid 139675068827392] (13)Permission denied: [client xx.xx.xxx.xx:48690] AH00035: access to /favicon.ico denied (filesystem path '/svr/portfolio/static') because search permissions are missing on a component of the path, referer: https://example.com/ [Wed Oct 28 08:51:34.899776 2020] [core:error] [pid 12041:tid 140689096595200] (13)Permission denied: [client xx.xx.xxx.xx:48694] AH00035: access to / denied (filesystem path '/svr/portfolio/portfolio') because search permissions are missing on a component of the path [Wed Oct 28 08:51:35.112403 2020] [core:error] [pid 12041:tid 140689088202496] (13)Permission denied: [client xx.xx.xxx.xx:48694] AH00035: access to /favicon.ico denied (filesystem path '/svr/portfolio/static') because search permissions are missing on a component of the path, referer: https://example.com/ Also here are the permissions on my project: drw-rw-r-- 9 …