Skip to content

Instantly share code, notes, and snippets.

@dtuominen
Created November 20, 2012 21:16
Show Gist options
  • Select an option

  • Save dtuominen/4121194 to your computer and use it in GitHub Desktop.

Select an option

Save dtuominen/4121194 to your computer and use it in GitHub Desktop.
json model example
""" I tried to make these as humanly readable as possible haha.. the serializer outputs a big ol nasty one line shit.
JOBS DATA STRUCTURE"""
serializers.serialize('json', Job.objects.all())
'[{"pk": 1, "model": "joblist.job",
"fields": {"store_number": "", "counter": 1,
"description": "suck dicks and cunts", "title": "cunty cunt factory",
"industry": "Banking", "company": 1, "created": "2012-11-01T04:38:21.751Z",
"modified": "2012-11-01T04:38:21.751Z", "job_code": "",
"location": "55447", "active": true, "slug": "cunty-cunt-factory",
"employment_type": true}},
{"pk": 2, "model": "joblist.job",
"fields": {"store_number": "", "counter": 2, "description": "eat shit",
"title": "fag farm", "industry": "Banking", "company": 1,
"created": "2012-11-13T03:22:36.779Z", "modified": "2012-11-13T03:22:51.616Z",
"job_code": "", "location": "55447", "active": true,
"slug": "fag farm dylan None", "employment_type": true}},
{"pk": 3, "model": "joblist.job",
"fields": {"store_number": "", "counter": 2,
"description": "die", "title": "butt head", "industry": "Banking",
"company": 1, "created": "2012-11-13T03:24:39.936Z",
"modified": "2012-11-13T03:25:45.685Z", "job_code": "", "location": "12344", "active": true, "slug": "butt head dylan None", "employment_type": true}},
""" APPLICATION DATA STRUCT """
'[{"pk": 1, "model": "joblist.application", "fields": {"rating": "","last_name": "tuominen", "valid_to_work_in_us": true, "college_attended": true, "highschool_years_attended": "4", "tuesday": true, "industry_experience": true, "wednesday": true, "eighteen_yes_no": true, "phone_exchange": "356", "college": "lsc", "streetaddress": "158 8th st", "want_followup_email": false, "viewed_status": true, "email_address": "dtuominen@gmail.com", "saturday": true, "city": "andover", "first_name": "dylan", "college_attending_yes_no": true, "monday": true, "zipcode": "55442", "thursday": true, "sunday": true, "job_skills": "none", "state": "AL", "phone_area_code": "612", "years_attended_college": "3", "high_school": "andover", "experience_years": "4", "highschool_graduate": true, "activities": "none", "evening": true, "college_graduate_yes_no": true, "friday": true, "followup_date": null, "job": 1, "active": true, "accepted": false, "slug": "no", "phone_digits": "0232", "created": "2012-11-01T04:39:50.112Z", "prospect_status": "", "applicant": 1, "modified": "2012-11-01T04:39:50.112Z", "morning": true, "followup_days": null, "afternoon": true, "night": true, "high_school_attending": false}}]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment