Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 608823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:30:02+00:00 2026-05-13T17:30:02+00:00

I am trying to implement django-facebookconnect , for I need to check if a

  • 0

I am trying to implement django-facebookconnect, for I need to check if a user logged in via Facebook or a regular user.

At the template, I can check if user logged in via facebook by checking request.facebook.uid
such as:

{% if is_facebook %}
{% show_facebook_photo user %}
{% endif %}

For this, I need to pass is_facebook': request.facebook.uid to the template and I will be using this in everywhere thus I want tried to apply it to an existing template context processor and call the snipplet above at the base.html, and it works fine for Foo objects:

def global_variables(request):
    from django.conf import settings
    from myproject.myapp.models import Foo
    return {'is_facebook': request.facebook.uid,'foo_list': Foo.objects.all()}

I can list Foo objects at any view without any issue however it fails for this new is_facebook, it simply returns nothing.

If I pass ‘is_facebook’: request.facebook.uid in every single view , it works but I need this globally for any view rendering.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:30:02+00:00Added an answer on May 13, 2026 at 5:30 pm

    If you have access via the request object, why do you need to add a special is_facebook boolean at all? Just enable the built-in django.core.context_processors.request and this will ensure that request is present in all templates, then you can do this:

    {% if request.facebook.uid %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i was trying to implement facebook login for my django app using django-facebook
I was trying to implement facebook logout functionality for my django app. In my
I'm trying to implement User Registration for my Django app. The book I read
I'm trying to implement tree-like comments for my django projects. Each comment can be
I'm trying to implement a Twitter authentication via OAuth on my Django application, but
I am trying to implement a to-do-list website to practice using Django. In models.py,
I am trying to use django-social-auth to implement google openid login into my app,
I am trying to implement the photologue django photo gallery here: http://skam.webfactional.com/blog/2007/08/08/django-based-photo-gallery-tutorial/ I dont
Trying to implement the signature verification of inapp billing on my server (Django/Python). I
I'm trying to implement some customize login through the custom methods in Django's models.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.