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 6599677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:31:20+00:00 2026-05-25T18:31:20+00:00

I am using Django to receive and process push notifications from the foursquare real-time

  • 0

I am using Django to receive and process push notifications from the foursquare real-time api. Each checkin is pushed as a POST request to my server containing a single parameter named checkin. I am trying to grab the value of the checkin parameter and convert it to a python dict. However, calling json.loads always results in the following error:

NameError: name 'true' is not defined

I know the json is valid, so I must be doing something wrong.

The code is:

import json    
def push(request):
  if request.is_secure():
    checkin_json = request.POST['checkin']
    checkin = json.load(request.POST)

The body of the post request is:

"checkin = 
{
"id": "4e6fe1404b90c00032eeac34",
"createdAt": 1315955008,
"type": "checkin",
"timeZone": "America/New_York",
"user": {
    "id": "1",
    "firstName": "Jimmy",
    "lastName": "Foursquare",
    "photo": "https://foursquare.com/img/blank_boy.png",
    "gender": "male",
    "homeCity": "New York, NY",
    "relationship": "self"
},
"venue": {
    "id": "4ab7e57cf964a5205f7b20e3",
    "name": "foursquare HQ",
    "contact": {
        "twitter": "foursquare"
    },
    "location": {
        "address": "East Village",
        "lat": 40.72809214560253,
        "lng": -73.99112284183502,
        "city": "New York",
        "state": "NY",
        "postalCode": "10003",
        "country": "USA"
    },
    "categories": [
        {
            "id": "4bf58dd8d48988d125941735",
            "name": "Tech Startup",
            "pluralName": "Tech Startups",
            "shortName": "Tech Startup",
            "icon": "https://foursquare.com/img/categories/building/default.png",
            "parents": [
                "Professional & Other Places",
                "Offices"
            ],
            "primary": true
        }
    ],
    "verified": true,
    "stats": {
        "checkinsCount": 7313,
        "usersCount": 565,
        "tipCount": 128
    },
    "url": "http://foursquare.com"
}
}"
  • 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-25T18:31:21+00:00Added an answer on May 25, 2026 at 6:31 pm

    Try json.loads(checkin_json) instead of json.load(request.POST). Notice the extra ‘s’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to save a new object from a django model using a POST
Using Django 1.1, I am trying to select the maximum value from a varchar
I'm using Google App Engine, Jquery and Django. I want POST data to be
Using Django's built in models, how would one create a triple-join between three models.
Using django comments framework http://docs.djangoproject.com/en/dev/ref/contrib/comments/ Not sure is there option, to make all comments
using django 1.4 I have a model with a datetimefield. I imported django.utils.timezone to
I using Django tagging project. That is was very stable project. Working on django
I'm using Django 1.3 with Python 2.7 in Ubuntu. Trying to install django-grappelli with
I'm using Django 1.3 with the MySQL 5.5 database backend. My assumption was that
I'm using django-avatars to handle user profile avatars for my website. I'm currently developing

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.