'how to use google login link to my login page using django-allauth?

I have created a project which is working nicely. I have a login page, signup page and profile page (as myspace). I just want to add an additional funtionality to my login page which is a user can login using google, fb, or instagram. but when i added the django-allauth to my project. it overwrite the existing login page. I just want to add an icon of google login. and not the whole page how i can do so.

my login page looks like this earlier and at bottom i added a google icon in which i want to add the functionality of auth app

login pages is looking like this for now

Update:-

what i thought is how django-allauth works, that i just need to add a url in login page with <a href > tag with 'allauth/google' or something like this.

what i see is i need to add a new path in urls.py for allauth which automatically create a login, signup and profile page.

problem which i figure out is

I have an accounts_app app in my project. the url for accounts_app is same as allauth thats why it overwrite the template

url.py of camorid_project

urlpatterns = [
    path('', include('camroid_app.urls')),
    path('accounts_app/', include('accounts_app.urls')), -----i want to add allauth functionality to this url
    path('accounts/', include('allauth.urls')),    -------------i don't want to add this because it create an inbuilt templates

    path('admin/', admin.site.urls),
]

what i want is i don't want to change login, signup and myspace page and i want to add icon in my login page with google login on click of which a user would be able login to the website.



Solution 1:[1]

in your login.html add {% load socialaccount %} and then <a href="{% provider_login_url 'google' %}"</a> this link will make you login with google api. and you can style the button if you wnat..

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 K. Sabri