Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Incorrect padding. Django with Google Chrome
I asked the question yesterday, but removed it, because it seems I gave too few information and explained the question poorly. But it is kind of solved, but solutions relate to different problems. I just implemented ideas towards this particular problem and I would like to share it, so it might help to somebody out there. So the problem I bumped into is: My site is based on the Django app, when I use Google Chrome it interpret it as (as I understand) 32 bit, meanwhile it is 64 bit (I'm not sure if I'm giving here right description of the problem, but general idea is that) and Google Chrome fails and gives following message: Incorrect padding What I have done to fix the problem. The solution based on: https://gist.github.com/perrygeo/ee7c65bb1541ff6ac770 So I went into: /usr/local/lib/python3.8/base64.py Function name is b64decode, it is on the line 87. It looks like: def b64decode(s, altchars=None, validate=False): """Decode the Base64 encoded bytes-like object or ASCII string s. Optional altchars must be a bytes-like object or ASCII string of length 2 which specifies the alternative alphabet used instead of the '+' and '/' characters. The result is returned as a bytes object. A binascii.Error is raised … -
How to create a fill-in-the-blank text in a survey? Got it vertically but not horizontally
I do a survey and want to create a fill-in-the-blank text. (How it looks right now). I use Django and CSS and can display it vertically, but how can I display my text and my IntegerFields horizontally within the same sentence? Since I use CSS I would like to code it within my forms.py file and not the template file. Anybody has an idea on how to do it? Thanks! forms.py class SurveyPolicy(forms.Form): policy6b = forms.IntegerField( # required=False, label='', widget=forms.NumberInput() ) def __init__(self, *args, **kwargs): super(SurveyPolicy, self).__init__(*args, **kwargs) self.helper = FormHelper() self.helper.form_id = 'survey-form' self.helper.label_class = 'col-lg-12' self.helper.field_class = 'col-lg-12' self.desc = "example" self.helper.layout = Layout( Fieldset( "<hr><h6 style='color: #2D2D2D; font-family: Arial;'>Die Maßnahmen sollten zu</h5>", Div('policy6b', css_class='form-group row-ml-0 mb-0'), ), Fieldset( "<h6 style='color: #2D2D2D; font-family: Arial;'>% durch eine Abgabe auf konventionelle Energieträger wie z.B. Erdgas finanziert werden - schließlich sollten Leute, die mehr CO2-Ausstoß verursachen auch mehr bezahlen.</h5>", ), [...] -
DRF HTML rendering
I recently finished Django doc. Now I am trying to recreate it with DRF. I am struggling with HTML rendering. Doing this code i have following mistake: object of type 'type' has no len() This how it look in Django(it works): class IndexView(generic.ListView): template_name = 'polls/index.html' context_object_name = 'latest_question_list' def get_queryset(self): return Question.objects.filter(pub_date__lte=timezone.now()).order_by('-pub_date')[:5] This is my code in DRF: class IndexViewDRF(APIView): renderer_classes = TemplateHTMLRenderer template_name = 'polls/index.html' def get(self, request): queryset = self.get_queryset() return Response({'latest_question_list': queryset}) @staticmethod def get_queryset(): return Question.objects.filter(pub_date__lte=timezone.now()).order_by('-pub_date')[:5] HTML file: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>My$ite</title> {% load static%} <link rel="stylesheet" type="text/css" href="{% static 'polls/style.css' %}"> </head> <body> {% if latest_question_list %} <ul> {% for question in latest_question_list %} <li><a href="{% url 'polls:detail' question.id %}">{{ question.question_text }}</a></li> {% endfor %} </ul> {% else %} <p>No polls are available.</p> {% endif %} </body> </html> P.S.1) Am i using method get_queryset correcly? Is there a better way? 2) Am i need to use Serializers here, as it is DRF or i am confused in using Serializers? 3) As i understood, there is no way to use generics views here? P.P.S I hope this is enough information. -
Django: call a view function via a button click
I want to call a view function resign_game by clicking an html button. Here is what i have tried after reading some Stackoverflow posts: <form action="{% url 'resign_game' %}" method="POST"> <button type="button">RESIGN</button> </form> Here is what I have in my urls.py: path('resign_game/', views.resign_current_game, name='resign_game') However, the view function was never called after I clicked the button. I would appreciate your suggestions. Thanks! -
Django: Image field does not display and is not uploaded into target repo
I'm new to Django and got this problem: ImageField does not display (while other fields display well) When uploading, new image is not uploaded into target repo What I have: Target repo containing default image and future upload images. Repo name: media. Repo structure: on the same level with manage.py Code in settings.py: MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' Code in models.py class CustomUser(AbstractUser): image = models.ImageField(default='default.jpg', upload_to='images/', blank=True) phone_number = models.CharField(max_length=12, null=True) bio = models.TextField(null=True) def __str__(self): return self.username Code in forms.py: class CustomUserChangeForm(UserChangeForm): class Meta: model = CustomUser fields = ['username', 'email', 'image', 'phone_number', 'bio'] Code in html: {% extends 'base.html' %} {% block content %} <h2>User Account View</h2> <div id="User"> <img src="media/{{ User.image }}"> <ul> <li>{{ User.username }}</li> <li>{{ User.email }}</li> <li>{{ User.phone_number }}</li> <li>{{ User.bio }}</li> </ul> </div> {% endblock %} I have researched on many sources and asked few mentors, but still have no luck. Please help if you can Cheers -
How to query in a list of values for text search in Django?
This is my modal description. class video_details(models.Model): video_id = models.CharField(max_length=50, unique=True) publishedAt = models.TextField() video_title = models.TextField(blank=True) video_desc = models.TextField(blank=True) thumbnail_url = models.TextField(blank=True) class Meta: db_table = 'VIDEO_DETAILS' I have to perform a search query based on a list of elements. response = video_details.objects.filter(Q(video_desc__incontains=['Control', 'simular'])| Q(video_title__incontains=['simular', 'Control'])) in more detail, I have to return those elements which are having video_desc and video_title as a substring from the list. sample values { "id": 91, "video_id": "Tr9-8tFVUOE", "publishedAt": "2020-09-02T18:20:59Z", "video_title": "b'Control Indirecto de un Motor CD con Python | Z Dynamics'", "video_desc": "b'Pyhon es una gran herramienta para simular sistemas din\\\\xe1micos. En este v\\\\xeddeo te mostramos c\\\\xf3mo simular el control de un motor de corriente directa - M\\\\xe1s ...'", "thumbnail_url": "https://i.ytimg.com/vi/Tr9-8tFVUOE/default.jpg" }, -
Django: Item "None" of "Optional[Any]" has no attribute "start_at"
I have this method within my PeriodManager model: def period_at(self, as_at, allow_erroneous=True) -> "Period": """ Return the period at the provided datetime. """ periods = ( self.get_queryset() .filter( Q(end_at__isnull=True) | Q(end_at__gt=as_at), start_at__lte=as_at, ) .order_by("-end_at") ) num_periods = len(periods) if num_periods == 0: raise self.model.DoesNotExist elif num_periods == 1: supply_period = supply_periods.first() elif num_periods == 2: if periods.first().start_at == periods.last().end_at: period = periods.first() else: raise self.model.MultipleObjectsReturned return period The "Period" model is defined as follows, related through a Foreign Key to the Property model: class Period(models.Model): property = models.ForeignKey( "properties.Property", related_name="periods", on_delete=models.CASCADE ) start_at = models.DateTimeField("Starts at") end_at = models.DateTimeField("Ends at", null=True, blank=True) created_at = models.DateTimeField(auto_now_add=True) I am getting these errors from the python type checker: error: Item "None" of "Optional[Any]" has no attribute "end_at" [union-attr] error: Item "None" of "Optional[Any]" has no attribute "start_at" [union-attr] error: Incompatible return value type (got "Optional[Any]", expected "Period") [return-value] But don't understand why, as by nature the queryset 'periods' will be returning only instances of Period, which all have the attributes 'start_at' and 'end_at'. -
Why is it showing "I/O operation on closed file" in Django?
I am working on a project in which a user uploads a file from the front-end and without storing the file it goes to the backend where some processing is done and results are returned back. Here are the functions which are dealing these works in the views.py file: def midpro(request, *args): global file if(request.method == 'POST'): try: file = request.FILES['data'] except: print("No File") if(file!=None): if(file.name[-1:-4:-1]!="vsc"): return render(request, 'mapp/nocsv.html') else: return linml(request) return render(request, 'mapp/nofile.html') def linml(request, *args): global retdata global file ans = list() col = ['D1', 'D2'] if(file!=None): ins = mapp.Mapp(file) retdata = ins.linml() for i in zip(col, retdata): ans.append(i) context = { 'ans':ans, 'data':file } return render(request, 'mapp/linml.html', context) the code inside Mapp class is class Mapp: def __init__(self, file): self.file = file def linml(self, *args): data = pd.read_csv(self.file) data = np.array(data) return([np.mean(data), np.var(data)]) pd is the alias for pandas library. np is the alias for numpy library. the error I/O operation on closed file is occuring in data = pd.read_csv(self.file) step. Can anyone tell me how can i resolve this issue? Also if I try to explicitly open the file with: with open(self.file) as f: It shows expected str, bytes or os.PathLike object, not InMemoryUploadedFile error, … -
How can we perform left without foreign key in Django ORM
I have 4 models in django as follows, I am facing problem in left join because there is not foreign key. class A(Model): id = models.BigAutoField(primary_key=True) col1 = models.CharField(max_length=20, default='', blank=False, null=False) col2 = models.CharField(max_length=20, default='', blank=False, null=False) ... class Meta: db_table = "A" constraints = [ models.UniqueConstraint(fields= ['col1','col2'], name='UX_Col1Col2'), ] class B(Model): id = models.BigAutoField(primary_key=True) col1 = models.CharField(max_length=150, blank=False, null=False) ... class Meta: constraints = [ models.UniqueConstraint(fields=["so_number"], name='UX_SOHeader'), ] class C(Model): id = models.BigAutoField(primary_key=True) col1 = models.ForeignKey(B, on_delete=models.CASCADE, blank=False, null=False) col2 = models.ForeignKey(D, on_delete=models.DO_NOTHING, blank=False, null=False) ... class D(Model): id = models.BigAutoField(primary_key=True) col1 = models.ForeignKey(B, on_delete=models.CASCADE, blank=False, null=False) ... Now my sql query is SELECT (some columns) from B inner join C on B.id=C.id inner join D on D.id=D.id left join A on A.col=B.col and A.col=C.Col I am facing problem while doing left join I am doing like this B.objects.select_related('C','D') How can I do left join -
How to perform number of days calculation in Django related field query
I have 2 models: class Assets(models.Model): assetMake = models.CharField(max_length=50,blank=True,) assetModel = models.CharField(max_length=50,blank=True,) class Maintenance(models.Model): assetID = models.ForeignKey(Assets, on_delete=models.CASCADE) dateRequested = models.DateTimeField(null=True, blank=True) dateCompleted = models.DateTimeField(null=True, blank=True) complete = models.BooleanField(default = False) I want to have a view that displays all the Assets in order of when they were last maintained (dateCompleted). Which this accomplishes below: from django.db.models import Max Assets.objects.annotate( last_modified=Max('maintenance__dateCompleted') ).order_by('-last_modified') But how can I calculate the number of days from dateCompleted to now so that I can display this value as well. Something like: Assets.objects.annotate( last_modified=Max('maintenance__dateCompleted'), days = ((timezone.now() - maintenance__dateCompleted).days ).order_by('-last_modified') -
Multiple Django projects hosting in iis
Im using django webframework for web application and iis for the hosting purpose.I have created multiple projects in django.On hosting,I found that, they three ways for hosting multiple sites which is, 1)By Port 2)Different header 3)Different ip what i want is hosting my project as below, project1 ---- mysite.com/prj1 project2 ---- mysite.com/prj2 project3 ---- mysite.com/prj3 Note that mysite.com is my domain. prj1 is my first poject and others respectively. Can somebody give me an idea either, 1)Consolidate my project (or) 2)hosting as shown above in iis. Thanks in advance.Please help me to sort out. -
Return list of values of one column grouped by another column in Django viewset
Let's say I have a model: class Entry(models.Model): content = models.CharField(max_length=140) email = models.EmailField() upload_date = models.DateTimeField(default=timezone.now) class Meta: db_table = 'entries' What I want to achieve is the viewset to return list of content and upload_date values per single email (since many entries can have the same email value), like that: [ { "email": "address1@test.test", "entries": [ { "upload_date": "2020-09-03", "content": "test content 1" }, { "upload_date": "2020-09-02", "content": "test content 2" }, ... ] }, { "email": "address2@test.test", "entries": [ { "upload_date": "2020-09-03", "content": "test content 11" }, { "upload_date": "2020-09-02", "content": "test content 12" }, ... ] }, ... ] I tried messing around with .values() and .annotate(), but with no luck. -
filter item by categories in django admin
i want to filter item by categories in my admin view when the order is placed and show it in admin and able to filter that or give staff user access to only specific categories here is my views class CategoryView(View): def get(self, *args, **kwargs): category = Category.objects.get(slug=self.kwargs['slug']) item = Item.objects.filter(category=category, is_active=True) context = { 'object_list': item, 'category_title': category, 'category_description': category.description, 'category_image': category.image } return render(self.request, "category.html", context) @login_required def add_to_cart(request, slug): item = get_object_or_404(Item, slug=slug) order_item, created = OrderItem.objects.get_or_create( item=item, user=request.user, ordered=False ) order_qs = Order.objects.filter(user=request.user, ordered=False) if order_qs.exists(): order = order_qs[0] if order.items.filter(item__slug=item.slug).exists(): order_item.quantity += 1 order_item.save() messages.info(request, "Item qty was updated.") return redirect("core:product", slug=slug) else: order.items.add(order_item) messages.info(request, "Item was added to your cart.") return redirect("core:product", slug=slug) else: ordered_date = timezone.now() order = Order.objects.create( user=request.user, ordered_date=ordered_date) order.items.add(order_item) messages.info(request, "Item was added to your cart.") return redirect("core:product", slug=slug) @login_required def remove_from_cart(request, slug): item = get_object_or_404(Item, slug=slug) order_qs = Order.objects.filter( user=request.user, ordered=False) if order_qs.exists(): order = order_qs[0] # check if the order item is in the order if order.items.filter(item__slug=item.slug).exists(): order_item = OrderItem.objects.filter( item=item, user=request.user, ordered=False )[0] order_item.quantity = 1 order.items.remove(order_item) order_item.delete() order_item.save() messages.info(request, "Item was removed from your cart.") return redirect("core:order-summary") else: # add a message saying the user dosent … -
below code isn't working if condition, how to use if condition under a for loop in python Django
{% for p in products %} {% if p.Category == Category.jam %} <div class="col-xl-4 col-lg-4 col-md-4"> <div class="services-wrapper single-services mb-60"> <div class="services-img"> <div id="carouselExampleIndicatorsOne" class="carousel slide" data-ride="carousel"> <div class="carousel-inner"> <div class="carousel-item active"> <img class="d-block w-100" src="{{p.image.url}}" alt="First slide"> </div> </div> </div> </div> <div style="padding: 32px 35px 45px 35px;" class="services-text text-center"> <h3><a>{{p.title}}</a></h3> <p style="text-align:left;"> {{p.description}} </p> </div> </div> </div> {% endif %} {% endfor %} the above code executing all categories, it's if statement not checking "category" is "jam" value. -
Class Based Views filtering with "def get_queryset(self):" - Assistance with solving issues
I am trying to filter Data in my Web application and having issues to make it work properly. My application has User model, to whom I assign different programs. Each program contain different exercises. Program Model: class Program(models.Model): patient = models.ForeignKey(User, on_delete=models.CASCADE, default=0) program_name = models.CharField(max_length=1000, default="") date_posted = models.DateTimeField(default=timezone.now) Program View: class ProgramListView(ListView): model = Program template_name = 'program/prog.html' context_object_name = 'programs' def get_queryset(self): return Program.objects.filter(patient=self.request.user) Program Template: {% extends "program/base.html" %} {% block content %} <h3> Please Choose your Program according to your Plan</h3> {% for program in programs %} <article class="media content-section"> <div class="media-body"> <div class="article-metadata"> <a class="mr-2" href="{% url 'program-detail' program.id %}">Program Name - {{ program.program_name }}</a> </div> <p class="article-content">Date Posted - {{ program.date_posted }}</p> </div> </article> {% endfor %} {% endblock content %} Exercise Model: class Exercise(models.Model): program = models.ForeignKey(Program, on_delete=models.CASCADE, default=0) date_posted = models.DateTimeField(default=timezone.now) name = models.CharField(max_length=1000, default="") description = models.TextField(default="") load_share = models.TextField(default="") breath_method = models.TextField(default="") recovery_method = models.TextField(default="") measure_method = models.TextField(default="") notes = models.TextField(default="") extra_info = models.TextField(default="") reps = models.PositiveSmallIntegerField(default=0) sets = models.PositiveSmallIntegerField(default=0) Exercises View (ProgramDetailView): class ProgramDetailView(DetailView): model = Exercise context_object_name = 'exercises' def get_queryset(self): program_num = get_object_or_404(Program, pk=self.kwargs.get('pk')) return Exercise.objects.filter(program=program_num) Exercises Template: {% extends "program/base.html" %} {% block content %} … -
django celery func.delay dont exetute func
I am working on a django project with 2 apps. I added a celery task in app A and this task calls another method in tasks.py in app B. The method in app B is called as follows send_mail_task_B.delay(subject=subject, from_email=from_email, to_email=to_email, bcc_email=bcc_email, body=body, html_message=html_message) send_email_task_B doesnt get executed with the .delay, but when I remove .delay it executes and sends emails. My __init__.py file in django project conf is as follows: from __future__ import absolute_import # This will make sure the app is always imported when # Django starts so that shared_task will use this app. from .celery import app as celery_app celery_app I am using Django 2.2.8 and celery 4.3.0. I am running celery task in django shell as follows: from A.tasks import send_email_method result=send_email_method_A.apply() -
Need Date Calculation in Django Model
I'm new to django and i'm trying to make laboratory information system with Django. Now i have problem in making modelform for laboratory machines.i fill the quality control interval (e.g. every 3 months) in qc_interval field and fill the starting date of machine in start_op_date field. i want to calculate the dates automatically and send to the qc_dates field for 1 year from date in start_op_date field.i also fill the duration for required calculation in plan_update_interval field. e.g. qc_interval = 3 months start_op_date = 2020-1-31 duration = 12 months qc_dates = [(2020-1-31),(2020-3-31),(2020-6-31),(2020-9-30),(2020-12-31)] ###this is what i want to calculate automatically### From this, i want to make notifications not to pass the quality control dates for our machines. -
How to display Selected option value Selected in option tag in Django?
I have Select Option Tag such as <select class="form-control" name="some_name" id="some_name"> {% for newdata in data %} <option value="{{newdata.id}}" {% if "newdata.id==demodata.id" %} selected {% endif %}>{{newdata.name}}</option> {% endfor %} </select> i am Displying option value dynamically using "data" variable. "demodata" is another variable containing values. Now i want to make selected option selected when "newdata.id==demodata.id" this condition is true.However below code is not working <option value="{{newdata.id}}" {% if "newdata.id==demodata.id" %} selected {% endif %}>{{newdata.name}}</option> i don't Know how to do that? -
(Django Rest Framework) How Do I Update The User Model
I am trying to update the user model (with Django Rest Framework's patch method in APIView) but i keep getting the error. `NotImplementedError: update() must be implemented.` Here is my Serializer: class UpdateSerializer(serializers.Serializer): class Meta: model = User fields = ('email', 'first_name', 'last_name', 'phone') Here is my View: class UpdateUser(APIView): permission_classes = [ permissions.IsAuthenticated, ] def patch(self, request): """ `Update User` """ user = self.request.user serializer = UpdateSerializer(user, data=request.data, partial=True) if serializer.is_valid(): serializer.save() return Response(serializer.data, status=status.HTTP_201_CREATED) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) I created a custom user model, my serializer for registering users works fine but this update serializer is giving that error -
How to sort DataTable columns by date
I'm using DataTable in my Django application. Everything works fine, but sorting by date is wrong. It's sorting as string, not date. html: <script> $(document).ready(function () { $('.document-table').DataTable({ "order": [ [0, "desc"] ], "bInfo": false, "pagingType": "full_numbers", }); }); </script> -
In Django Datatable server-side processing, can we search for field which is not in database
I have implemented a table in Django showing all data of a particular database. It is server-side processing. from django_datatables_view.base_datatable_view import BaseDatatableView class SearchBar(BaseDatatableView): model = Test order_columns = ['testname', '', 'pass', 'fail'] def get_initial_queryset(self): return Test.objects.all() def filter_queryset(self, qs): search = self.request.GET.get('search[value]', None) if search: qs = qs.filter(testname__icontains=search) return qs def prepare_results(self, qs): json_data = [] i = 0 for item in qs: i += 1 executed = int(item.pass) + int(item.fail) json_data.append([ item.testname, executed , item.pass, item.fail ]) return json_data In the Search box of the data table, (testname, pass, fail) are fields of database Test and hence they are searchable but the field 'executed' is calculated value. How can I make this also as a searchable so that if I type some number and if its present in 'executed' it should also be shown. Or perhaps any external data which will be appended to this table, can it be made searchable in same table? -
Python Django-Rest-Framework update user on data creation
Assuming I have 2 models, one User, the other Post. A user can create posts. A user has a field called 'exp_pts' as an IntegerField. This is meant to increment by say 30 when the user creates a post. I assume I would have to use the create() method in the PostSerializer. This is my current serializer for Posts (currently not working due to the create() method not working as intended) class PostSerializer(serializers.ModelSerializer): class Meta: model = Post fields = ('id', 'user', 'kingdom', 'post_type', 'file_path', 'title', 'description', 'created_at', 'updated_at') def to_representation(self, instance): data = super().to_representation(instance) data['user'] = SimpleUserSerializer( User.objects.get(pk=data['user'])).data data['kingdom'] = KingdomSerializer( Kingdom.objects.get(pk=data['kingdom'])).data return data # This is not yet working def create(self, validated_data): user = validated_data.pop('user') user.exp_pts += 30 user.save() return user What is a way to do the above? If the create() method isn't adequate then what other way is there to achieve this? Any help much appreciated. Thank you. -
How can I send email reminder before 1 day of an event in Django?
I have three models. CustomUser Webregister Zlink And following is the code for Zlink in models.py, class Zlink(models.Model): customUser = models.ForeignKey(CustomUser, on_delete=models.CASCADE) #foreignkey 1 webregister = models.ForeignKey(Webregister, on_delete=models.CASCADE) #foreignkey 2 reg_link = models.CharField(max_length=255,null=True, blank=True) def __str__(self): return str(self.pk) "foreignkey 2" gives me the event id and "foreignkey 1" gives me an email address of user. Among the many fields, one of the field in Webregister is event_starts that contains date and time of event when it will going to start. I can get the email address of the user in the event using firing the query, x = Webregister.objects.get(id=1) x.customUser Now if the user having multiple users then how these email address to send an email of reminder before a day of event ? Any Clue ? I'm new in django please. -
Apache and Django... Cannot start Django on the server
This question relates to Apache serving Django. Seemingly I cannot start Django app on the server, which is based on Centos 7. I was following this tutorial: https://www.supportsages.com/configure-django-with-apache-in-centos7/ . The instructions how to tight Django to Apache is right at the end of the tutorial. The structure of my Django app is standard: [projectname]/ ├── [projectname]/ │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── manage.py In setting.py: SECURE_HSTS_SECONDS='0' SECURE_HSTS_INCLUDE_SUBDOMAINS=True #SECURE_SSL_REDIRECT=True SESSION_COOKIE_SECURE=True SESSION_COOKIE_SAMESITE = 'None' CSRF_COOKIE_SECURE = True SECURE_HSTS_PRELOAD=True SECURE_REFERRER_POLICY='None' #or 'same-origine' ALLOWED_HOSTS = [] WSGI_APPLICATION = 'scrap.wsgi.application' STATIC_ROOT = "/path to static/static" STATIC_URL = '/static/' Allowed hosts are in: project/lib64/python3.8/site_packages/django/http/request.py I created: django.conf at the location: /etc/apache2/conf and included it into httpd.conf at the end of the file as: include django.conf django.conf: Alias /static /home/organizations/pro/projects/sc/sc_site/static <Directory /home/organizations/pro/projects/sc/sc_site/static> Require all granted </Directory> <Directory /home/organizations/pro/projects/sc/sc> <Files wsgi.py> Require all granted </Files> </Directory> WSGIDaemonProcess scrap python-path=/home/organizations/pro/projects/sc:/home/organizations/pro/sc_project/lib/python3.8/site-packages WSGIProcessGroup sc WSGIScriptAlias / /home/organizations/pro/projects/sc/sc/wsgi.py I'm totally new to the Server - Apache - Django and most likely missing something obvious... Please let me know if I didn't post some needed information to resolve the question. -
GitHub repository not found during pipenv install
Here in the picture you can see what happened Actually I received the Djoango project from my developer with a virtual environment (pipenv) And when I try to install with his given instructions Like Pipenv install then I got the error GitHub repository not found. during installing dependencies. And a few days ago he solved it by accessing my Mac with anydesk and solved easily like the same steps. And when I try to do same in my other Mac Again after installing some dependencies, it has given me the error GitHub repository not found. Can Anyone tell me what's the real problem? What should I do?