-1

I could not really explain it in the title of this question . I need to get the profile image of a user in django allauth. In this question : how to display image from google account: django-allauth , a answer was to use user.socialaccount_set.filter(provider='google')[0].extra_data['picture'] in the server side . Where is server side ?

Error: return render(request,"homepage.html")^ IndentationError: unindent does not match any outer indentation level

Prateek p
  • 117
  • 1
  • 11
  • Could you share your views.py? Also, it seems you do not understand fundamental concepts of Django very well, so I recommend you take a tutorial. –  Nov 10 '21 at 02:43

1 Answers1

2

You can put your server-side code in views.py inside an app.

  • I get an error after putting it in my home page . I put the line above the return render. Exact error in question. – Prateek p Nov 08 '21 at 10:14
  • It's just because you forgot to indent. –  Nov 10 '21 at 02:42
  • Oh , yes . I forgot . Thanks , but now I get another error .user is not defined . Here's the view.py . https://gist.github.com/PrateekPathak9002/16e1807325e8db7aa815511c33b375db – Prateek p Nov 10 '21 at 09:24