Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Get all objects that have entries in another model
class Event(HashidModel, TimeStampedModel): organizer = models.ForeignKey( "organizers.Organizer", on_delete=models.CASCADE, related_name="events" ) How do I get all organizers, that have existing events? My challenge is that I have to go through the organizer (I can't start from the event mode.l) organizer = Organizer.objects.all() -
Application-specific password required when trying to send confirmation email to django user
I want to send confirmation email to user in django app using my website domain email. it worked fine when testing with a gmail but now it returns "Application-specific password required" SECRET_KEY = "sample" EMAIL_HOST = "smtp.sitedomain.de" EMAIL_PORT = 587 EMAIL_HOST_USER = "sample" EMAIL_HOST_PASSWORD = "sample" -
Creating a search bar with Django to query a MongoDB database
I have a search bar where I want to search for perfumes in a MongoDB database. I tried two ways but it never works. Here is the HTML template for both: search_similar.html: <div class="recommendations"> <!-- <div class="login-page"> --> <div class="form"> <form action="{% url 'search_results' %}" method="get"> <input name="q" type="text" placeholder="Perfume name..."> <input type ="submit" value="Find Similar Perfumes" /> </form> <form class="login-form" action = "/predict" method="POST"> <input type="text" placeholder="perfume name"/> <!-- https://www.youtube.com/watch?v=TRODv6UTXpM&ab_channel=ProgrammingKnowledge --> <input type ="submit" value="Find Similar Perfumes" /> </form> </div> </div> views.py: import pymongo import todo.config as config from django.db.models import Q username = config.username password = config.password ... class SearchResultsView(ListView): model = Perfume template_name = 'todo/search_similar_results.html' def get_queryset(self): # new query = self.request.GET.get('q') perfume_list = list(collection.find({'q0.Results.0.Name': {"$regex" : query}}, {'item_name': 1, 'brand': 1, 'gender': 1, 'note': 1, 'tags': 1, 'theme': 1, '_id': 0})) print("perfume_list: ", perfume_list) return perfume_list But perfume_list is hopelessly empty. But even in MongoDB Atlas, I have problems to search in nested dictionaries. Indeed the query in the image below does not give the result that we can see: Anexo: urls.py urls.py: from django.contrib import admin from django.urls import path from todo import views urlpatterns = [ ... # similar path('similar', views.search_similar, name='similar'), path('similar_results', views.SearchResultsView.as_view(), … -
RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054 send-pack: unexpected disconnect while reading sideband packet fatal:
I am trying to Upload my Django project on GitHub and It is not uploading. Everything is working fine BUT error is showing at the End. The Error Total 318 (delta 73), reused 0 (delta 0), pack-reused 0 error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054 send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly Done What i am trying I open git bash then type git init Then i type git add . then `git commit -m "first commit" , It all worked fine. and then git remote add origin <repository_url>, It also worked fine then i type git push origin master then it shows Total 318 (delta 73), reused 0 (delta 0), pack-reused 0 error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054 send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly Done Then i checked into my repository and it is showing nothing. I dont' know what is the problem What have i tried I also tried git config --global http.postBuffer 524288000 in GitBash but nothing worked. I deleted my account too and created a new one BUT nothing worked. … -
problem in integrating Paho Python MQTT Client with django
I want to send a message from paho C client to my Django project. I added mqtt.py in one of the project's application folder with the following code: import paho.mqtt.client as paho # from .models import Temperature, Turbidity, Refined_fuels, Crude_oil # here from datetime import datetime def on_connect(client, userdata, flags, rc): client.subscribe("sensor/temp", qos=0) def on_subscribe(client, userdata, mid, granted_qos): print("Subscribed: "+str(mid)+" "+str(granted_qos)) # The callback for when a PUBLISH message is received from the server. def on_message(client, userdata, msg): now = datetime.now() # following lines are supposed to save data on database # temp = Temperature(captured_timestamp=message[0], data=message[1], received_timestamp=now) # temp.save() # turbidity = Turbidity(captured_timestamp=message[0], data=message[2], received_timestamp=now) # turbidity.save() # refined_fuels = Refined_fuels(captured_timestamp=message[0], data=message[3], received_timestamp=now) # refined_fuels.save() # crude_oil = Crude_oil(captured_timestamp=message[0], data=message[4], received_timestamp=now) # crude_oil.save() # defining client client = paho.Client(client_id="testSubscriber", clean_session=True, userdata=None, protocol=paho.MQTTv311) # adding callbacks to client client.on_connect = on_connect client.on_subscribe = on_subscribe client.on_message = on_message client.connect(host="localhost", port=1883, keepalive=60, bind_address="" ) and in __init__.ppy file I added the following code: from . import mqtt mqtt.client.loop_start() it works fine, when I send a message from the publisher client, I receive that message in the django(I print that in terminal). I am using HiveMQ-CE as local broker. but I want to add … -
Django REST RetrieveAPIView combining querysets
I'm trying to build a queryset which combines two query results, namely from Category and Course. Every Course has a Category foreign key. Is there a way to add the respective Courses to each Category? Example: { "id": 61, "name": "fgfdf", "courses": { "id": 1, "category": 61, "title": "mytitle" }, { ... } } Url path('dict/<pk>/', DictView.as_view(), name='detail') Models class Category(models.Model): name = models.CharField(max_length=255, blank=False, null=False) class Course(models.Model): category = models.ForeignKey(Category, on_delete=models.CASCADE, null=True) title = models.CharField(max_length=255, blank=False, null=False) View This is what I imagined but it's obviously incorrect, I've done some research but I couldn't find what I needed. class DictView(RetrieveAPIView): queryset = Category.objects.all() serializer_class = CategorySerializer def get_queryset(self): queryset = Category.objects.all() courses = list(Course.objects.filter(category=pk)) queryset['courses'] = courses; return queryset -
i trying to apply crud in django but got this expected string or bytes-like object error
i doing crud operations in django but editing/updateing the user i got an error . this is my models.py # -*- encoding: utf-8 -*- """ Copyright (c) 2019 - present AppSeed.us """ from django.db import models from django.contrib.auth.models import User #from __future__ import unicode_literals from django.db import models # Create your models here. class Member(models.Model): username = models.CharField(max_length=40, blank=False) email = models.EmailField(max_length = 40, blank = False) mobile_number = models.CharField(max_length=10, blank=True) location = models.TextField(max_length=255, blank=False) date = models.DateField('%m/%d/%Y') created_at = models.DateTimeField('%m/%d/%Y %H:%M:%S') updated_at = models.DateTimeField('%m/%d/%Y %H:%M:%S') this is the views.py file `# -*- encoding: utf-8 -*- """ Copyright (c) 2019 - present AppSeed.us """ from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404, redirect from django.template import loader from django.http import HttpResponse from django import template from django.contrib.auth.decorators import login_required from .models import Member import datetime from django.core.exceptions import ValidationError from django.contrib import messages from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger @login_required(login_url="/login/") def index(request): context = {} context['segment'] = 'index' html_template = loader.get_template( 'index.html' ) return HttpResponse(html_template.render(context, request)) @login_required(login_url="/login/") def pages(request): context = {} # All resource paths end in .html. # Pick out the html file name from the url. And load that template. try: load_template = request.path.split('/')[-1] context['segment'] = … -
Django,IIS. I can't publish django using IIS
I'm trying to publish django using Microsoft IIS. I got an error when accessing http://localhost. Django version is 3.1.7 and python is 3.9.2, windows server 2019. Error occurred while reading WSGI handler: Traceback (most recent call last): File "c:\program files\python39\lib\site-packages\wfastcgi.py", line 791, in main env, handler = read_wsgi_handler(response.physical_path) File "c:\program files\python39\lib\site-packages\wfastcgi.py", line 633, in read_wsgi_handler handler = get_wsgi_handler(os.getenv("WSGI_HANDLER")) File "c:\program files\python39\lib\site-packages\wfastcgi.py", line 603, in get_wsgi_handler handler = getattr(handler, name) AttributeError: module 'django.core' has no attribute 'wsgi' StdOut: StdErr: -
Programmatically rendering for in django inclusion_tag
I have an inclusion tag that renders a form. This works: @register.inclusion_tag('mailing_list/panel/mailing_list.html') def show_mailing_list(): """Offer to join the mailing list. """ form = QuickMailingListSignupForm return {'form': form} On static pages, I can write {% show_mailing_list %} and get a signup form. But on dynamic (user-editable) pages, I can't do this, because we sanitise input, offering markdown instead. We've extended markdown somewhat to provide access to our own widgets, and so I thought to do the same here. {{ some_user_text_md|markdown }} Getting the markdown parser to recognise and call the inclusion_tag function is easy, but the markdown processor above has no idea of the request context, and so the CSRF tag is not rendered. Is there a way to provide request context to the customer (markdown) filter so that I can render the form with CSRF tag? -
why i can't use parantheses or colons or many other charachters in jinja?
I need to use characters like "()", "[]", ":" or many other characters but when I write a code like this: {% for cat, posts in cat_divided.items %} <div class="tab-pane animated fadeInRight" id="tab_{{ cat.replace(" ", "") }}"> I get the error: TemplateSyntaxError at / Could not parse the remainder: '(" ", "")' from 'cat.replace(" ", "")' can anybody help? -
Python(django) decoding. '_io.BufferedWriter' object has no attribute '_committed'
I upload existing images in the database to the client, then send them back to the server. On the server, I want to decode these (blob) files or bytes into a simple image. ERROR: AttributeError is thrown: '_io.BufferedWriter' object has no attribute '_committed' views.py def perform_update(self, serializer): serializer.validated_data['author'] = self.request.user op = serializer.save() print(op) length = self.request.POST.get('number') existing_images_obj = Images.objects.all() for k in range(0, int(length)): image_obj = self.request.FILES.get(f'imagesPi{k}') decodeObj = base64.decodebytes(image_obj.read()) with open("hello.jpg", 'wb') as file: file.write(decodeObj) print(file) Images.objects.create( post=op, image=file ) -
How to pass to view a form and a queryset in Django?
I'm still noob and Django and I'm not getting this issue. I'm trying to send to a view a form and a queryset with all of my clients, however the queryset is not returned. I'm doing this in trabalhos\views.py and the queryset is from a model in clientes\models Can anyone help me? This is really breaking my head. Thank you def novotrabalho_view(request, *args, **kwargs): if request.method == 'POST': form = novoTrabalho(request.POST) if form.is_valid(): codigo = form.cleaned_data['codigo'] nome = form.cleaned_data['cliente'] paciente = form.cleaned_data['paciente'] dispositivo = form.cleaned_data['dispositivo'] tecnico_responsavel = form.cleaned_data['tecnico_responsavel'] c = trabalho(codigo=codigo, cliente=nome, paciente=paciente, dispositivo=dispositivo, tecnico_responsavel=tecnico_responsavel) c.save() form = novoTrabalho() listaclientes = cliente.objects.all() return render(request, "novotrabalho.html", {'form': form, 'listaclientes': listaclientes} ) -
How to use smart-selects in Django admin panel?
I am trying to do smart-selects in Django admin panel using django-smart-selects. I want to make sure that when creating a term, you first need to select an subject, and based on this item, select a section related to this subject. I did pip install django-smart-selects and added smart_selects to INSTALLED_APPS. Here is my code. models.py from smart_selects.db_fields import ChainedForeignKey class Subject(models.Model): name = models.CharField(max_length=128) class Section(models.Model): subject = models.ForeignKey(Subject, on_delete=models.CASCADE) name = models.CharField(max_length=128) position = models.IntegerField() class Term(models.Model): subject = models.ForeignKey(Subject, on_delete=models.CASCADE) section = ChainedForeignKey(Section, chained_field='subject', chained_model_field='subject', show_all=False) name = models.CharField(max_length=128) definition = models.TextField() urls.py urlpatterns = [ path('admin/', admin.site.urls), path('', include('subjects.urls')), path('', include('main.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) When I create a new term, when I select a subject, all sections are offered to choose from, not just those related to that subject. I think I need to add include('smart_selects.urls') to the admin path. I tried to do this, but it didn't change anything: path('admin/', admin.site.urls), path('admin/', include('smart_selects.urls')), Also I tried to do this, but it gives the "TypeError 'tuple' object is not a mapping": path('admin/', admin.site.urls, include('smart_selects.urls')), -
Downloading zip and parsing csv file in django, copying data to local DB(sqllite)
I have a url, which downloads a zip file, containing a csv file. I want to parse the data and import it to local Database(sqlite) in Django. In brief, input = url, pre-processing download .zip-> convert to .csv, output=csv rows in DB which has columns of csv as fields. -
'function' object has no attribute 'get' error in django
greetings dear django experts, i am having an issue with my website i am using the defualt login view in django from from django.contrib.auth import views as auth_views the code is working like this inside the urls.py file : from django.contrib.auth import views as auth_views path('login/',auth_views.LoginView.as_view(template_name='website/login.html'), name='login-page'), but using this methode i don't have a view inside my views.py file. the problem is i need to define a view inside my viwes.py to record logs for any one accessing this page the problem is when i tried the following code i get the error "'function' object has no attribute 'get'" the code that gives me the error is as the following: views.py from django.contrib.auth import views as auth_views def login(request): ip = get_client_ip(request) logger.info(f'user access: {request.user} via ip:{ip}') return auth_views.LoginView.as_view(template_name='website/login.html') urls.py path('login/',views.login, name='login-page'), -
Django Form Dynamic Fields looping over each field from POST and creating records
I'm looking for some advice where to go from here. I've been working on making a Form, which dynamically generates its fields. The form is working and generating everything correctly. However, I am having issues with how to save the actual form data. I'm looking for each field to save as a new item in a model. The View Class from view.py class MaintenanceCheckListForm(LoginRequiredMixin, FormView): login_url = '/accounts/login' template_name = 'maintenance/checklist.html' form_class = MaintenanceCheckListForm success_url = reverse_lazy('m-checklist') def form_valid(self, form): form.cleaned_data for key, values in form: MaintenanceCheckList.objects.create( item = key, is_compliant = values ) return super().form_valid(form) The Form from forms.py class MaintenanceCheckListForm(forms.Form): def __init__(self, *args, **kwargs): super(MaintenanceCheckListForm, self).__init__(*args, **kwargs) items = Maintenance_Item.objects.all() CHOICES = ( ('P','Compliant'), ('F','Non-Compliant'), ) for item in items: self.fields[str(item.name)] = forms.ChoiceField( label=item.name, choices=CHOICES, widget=forms.RadioSelect, initial='F', ) The Model, from models.py class MaintenanceCheckList(CommonInfo): CHOICES = ( ('P','Compliant'), ('F','Non-Compliant'), ) id = models.AutoField(primary_key=True) item = models.CharField(max_length=100) is_compliant = models.CharField(max_length=20, choices= CHOICES) I am having trouble accessing the data from the Form when it POST's. I've done some troubleshooting where I have set the values statically in the '''form_valid''' and it appears to generate the correct amounts of entires in the model. However the trouble begins when I attempt … -
Отображение ckeditor в django-admin
помогите решить вопрос. Я добавил ckeditor на свой сайт, все отображается корректно, но я хотел бы , чтобы в админке тоже происходило форматирование, сейчас это выглядит так: без форматирования Я бы хотел чтобы это было без html тегов и выглядело так: с форматированием -
Use jinja to change url pointer in css
I am building a website using Django, and I want to use the same template on two sites, but change the background color. Currently in my html I have <section> <div class="jumbotron jumbotron-fluid" id ="coverNytorv"> <div class="container-fluid"> <nav class="navbar navbar-expand-md" id ="navbar"> <button class="navbar-toggler navbar-light" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="#navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav ml-auto"> <li class="nav-item active"> <a class="nav-link px-5" id ="mainNavlink" href="#anchor_locations">LOCATIONS<span class="sr-only">(current)</span></a> </li> <li class="nav-item active"> <a class="nav-link px-5" id ="mainNavlink" href="#anchor-aboutUs">ABOUT US<span class="sr-only">(current)</span></a> </li> <li class="nav-item active"> <a class="nav-link px-5" id ="mainNavlink" href="#anchor-mainContact">CONTACT<span class="sr-only">(current)</span></a> </li> </ul> </div> </nav> </div> </div> </section> In the corresponding css I have #coverNytorv { text-align: center; align-items: center; background: url("media/cover.jpg") no-repeat center center; background-size: cover; min-height: 100%; justify-content: center; color: white; height: 700px; display: flex; margin-bottom: 0px; } I want to change the background image in the view.py. How should my background in css look like so that I can pass a path variable to the background image from the view.py? I imagine somehting like {{ imagePath }} in css background, and then in my view.py I could do something like context = {'imagePath' : 'url_path_to_my_image'} -
Returning to page that brought you there Django - double deep
For my Python/Djang app I would like to have button 'back' on every page level, that should take you the page you came from. My structure: Main webpage -> All patients list -> View patients credentials -> Edit patients data -> Dentists patients list -> View patients credentials -> Edit patients data -> Orthopedy patients list -> View patients credentials -> Edit patients data First issue was, that "View patients credentials", could be accessed from different pages. I went pass that with help from Rahul Gupta Returning to page that brought you there Django, with solution using url: '?next={{request.path}}' Problem occurs when I would like to use the same solution to go back 2 times from "Edit patients data", through "View patients credentials" to web that brought you there. Is there any better way to deal with that issue, than to add with every step new new 'next' address: ie. '?next1=XX?next2=YY?next3=ZZ' etc? With two steps this solution would be fine, but would very problematic if I had much more steps, or if I require button to work like 'back button' in webpage, leading you for, let's say, 10 or more last pages. My code: In "All patients list", "Dentists' patients … -
Django defer() and only() queryset not working?
Please guide me if i misunderstand the correct use of defer() or only() in queryset. This is the code where i am trying to get only seleted fields data from Donor model to make process fast because it has 2000 entries and when i use all() it takes time to fetch data. def donor(request): # donors = Donors.objects.all() donors = Donors.objects.only('donorid','donor_type','title','donor_name','address', 'mobile_no','jamatkhana') # donors = Donors.objects.defer('donorid','donor_type','title','donor_name','address', 'mobile_no','jamatkhana') return render(request,"hod_template/add_donor_template.html",{"donors":donors}) After use of "only()" or "defer()" the result is still same as "all()" none of the selected field neither deferred nor only. even it takes more time to load than all(). Please tell me how to get only these selected field data from donor model. i also tell you i tried "Values()" Method as well but the problem is the "jamatkhana" field is ForeignKey and i want its data as well. but using of "Values()" method it only get values not foreignkey inner data. hope i explain properly? -
two different models have the same name in admin page django
I have built a custom user model like this: class User(AbstractUser): is_patient = models.BooleanField(default=True) is_regular = models.BooleanField(default=False) phoneNumber = models.IntegerField(blank=True, null=True) city = models.CharField(max_length=100, blank=True) I want to create another user type called patient which have similar attributes to the User class. so I added this to my models.py and inherited from User class: class Patient(User): age = models.IntegerField(null=True) When I want to check them on the admin page, it depicts both as users, not users and patients. this is my admin: from django.contrib import admin from .models import User, Patient from .forms import CustomUserCreationForm, CustomPatientCreationForm from django.contrib.auth.admin import UserAdmin class CustomUserAdmin(UserAdmin): model = User add_form = CustomUserCreationForm fieldsets = ( *UserAdmin.fieldsets, ( 'User role', { 'fields': ( 'is_patient', 'is_regular', 'phoneNumber', 'city', ) } ) ) class CustomPatientAdmin(UserAdmin): model = Patient add_form = CustomPatientCreationForm fieldsets = ( *UserAdmin.fieldsets, ( 'User role', { 'fields': ( 'is_patient', 'is_regular', 'phoneNumber', 'city', 'age', ) } ) ) admin.site.register(User,CustomUserAdmin) admin.site.register(Patient,CustomPatientAdmin) as you can see, I have registered both models, but somehow the patient model's name is changed to users. What am I doing wrong? -
how do i set my authentication backend as default in settings.py file of my django project(Extended AbstractBaseUser model)
I have written the following class for Auth Back end and placed it inside a file "authentication.py" inside the app directory: from events.models import User class authBackend(): def authenticate(self, request, username, passwprd): try: user = User.objects.get(rollNo=username) success = user.check_password(password) if success: return user except User.DoesNotExist: pass return None def get_user(self, uid): try: return User.objects.get(pk=Uid) except: return None then i added (or at least i thought i did) it to settings.py: AUTHENTICATION_BACKENDS = [ 'events.authentication' ] this is how i am logging in the user: def login_view(request): if request.method == "POST": # Attempt to sign user in rollno = request.POST["rollno"] password = request.POST["password"] user = authenticate(request, username=rollno, password=password) # Check if authentication successful if user is not None: login(request, user) return HttpResponseRedirect(reverse("events:index")) else: return render(request, "events/login.html", { "message": "Invalid roll number and/or password." }) else: return render(request, "events/login.html") But i am getting the following trace back: ImportError at /login Module "events" does not define a "authentication" attribute/class I am a noob and i am pretty sure i am doing something wrong, i just don't understand what it is. Can someone please tell me how to do it right? -
Reverse for 'url_name' with arguments '(None,)'
I am trying to add a download button in my change form by following this answer. This works fine. But the problem is when I try to add an object from and empty change change form I get this error: Reverse for 'voucher' with arguments '(None,)' not found. 1 pattern(s) tried: ['admin/bookings/get_voucher/(?P<pk>[0-9]+)/$'] Can you please suggest me a way to solve this issue? Either I want to solve it making it work with None primary key or Instead of crashing the server i want to handle it to show some useful message. -
Django mptt rendering item associated to parent category and sub category
I am building a django app for pathology/laboratory reporting system. I need a form that will take value for different tests like (HIV-negative, some test-10). Since there are 100 and 1000 of tests and these test are grouped by categories like chemical test, microscopic test. I need to render a template with a form for these tests. I used django-mptt and building a structure in django admin seems easy but i couldn't make it work in frontend templates. Below are my project codes and descriptions. class TestCategory(MPTTModel): name = models.CharField(max_length=100) parent = TreeForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='children') is_active = models.BooleanField(default=True) created_at = models.DateTimeField(auto_now_add=True) update_at = models.DateTimeField(auto_now=True) class Meta: verbose_name_plural = "Test Categories" class MPTTMeta: order_insertion_by = ['name'] def __str__(self): return self.name class Test(models.Model): QUALITATIVE = "1" QUANTITATIVE = "0" TEST_TYPE_CHOICES = [ (QUALITATIVE, 'QUALITATIVE'), (QUANTITATIVE, 'QUANTITATIVE'), ] test_category = TreeForeignKey(TestCategory, on_delete=models.CASCADE, related_name='test_category') name = models.CharField(max_length=50) unit = models.CharField(max_length=10) specimen = models.ForeignKey(Specimen, on_delete=models.CASCADE, blank=True, null=True) test_type = models.CharField(max_length=2, choices=TEST_TYPE_CHOICES, default=QUALITATIVE) reference_text = models.TextField() price = models.DecimalField(max_digits=10, decimal_places=2, blank=True, default=0, verbose_name='Price Per Unit') is_active = models.BooleanField(default=True) def __str__(self): return self.name class Meta: ordering = ['test_category'] # views.py def report_create_view(request, pk): context ={} form = CreateReportForm(request.POST or None) if form.is_valid(): patient = self.objects.all().filter(patient_id=pk) … -
Git repository is not showing in GitHub
I am new in using GitHub, I am trying to Upload a Django Project on GitHub from Git Bash BUT when i push it on GitHub then it is not showing in Browser. The Problem Git Repository is not uploading or showing in Browser. What have i tried git init ---Output :- Initialized empty Git repository in C:/doingstatic/myproject/.git/ git add . ---Output :- The file will have its original line endings in your working directory warning: LF will be replaced by CRLF in static/js/cropper.min.js. The file will have its original line endings in your working directory warning: LF will be replaced by CRLF in static/js/jquery-3.1.1.min.js. The file will have its original line endings in your working directory AND MANY MORE LINES. git commit -m "First Commit" ---Output :- ALL THE FILES THAT ARE IN FOLDER. git remote add origin https://github.com/progam/rr.git git push origin master ---Output :- Asking Git for Login and again after SSH asking for Login. AND THEN :- Logon failed, use ctrl+c to cancel basic credential prompt. Enumerating objects: 541, done. Counting objects: 100% (541/541), done. Delta compression using up to 8 threads Compressing objects: 100% (530/530), done. error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, …