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

  • SEARCH
  • Home
  • 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 8829917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:56:45+00:00 2026-06-14T07:56:45+00:00

This is a test.py file that tries to send data to the api endpoint:

  • 0

This is a test.py file that tries to send data to the api endpoint:

import os
import requests


import uuid


def get_uid():
    return str(uuid.uuid4())
oauth_consumer_key = 'abcd'
oauth_signature = 'efgh'

oauth_signature_method = 'PLAINTEXT'
oauth_timestamp ='132798314211'
oauth_nonce = get_uid() + "aa"

oauth_token_secret = ""
x_auth_mode = 'client_auth'
x_auth_username = ''
x_auth_password = ''
userid = ''

instagram_id = "asdas"
instagram_token = "asdas"

params = {

            'oauth_consumer_key':oauth_consumer_key,
            'oauth_signature':oauth_signature,
            'oauth_signature_method':oauth_signature_method,
            'oauth_timestamp': oauth_timestamp,
            'oauth_nonce': get_uid(),
            'instagram_id' : instagram_id,
            'instagram_token':instagram_token,            
            }

url = 'http://localhost:8000/instagram/signin/'
data = {'instagram_id':instagram_id,'instagram_token':instagram_token}

r = requests.post(url,params)

print r.content

This is my Testhandler:

class TestHandler(AnonymousBaseHandler):



    def read(self,request,action=None):

        """Get request to get the instagram code
        """
        print action

        if action == "signin":
            return "hello121"
            #self.instagram_signin(request)




    def instagram_signin(self,request):
        """
            Check if the instagram user exists in the database
        """
        return "Yes!"

Yes, as basic as that and it returns an error:

 File "/usr/local/lib/python2.7/dist-packages/django_piston-0.3dev-py2.7.egg/piston/handler.py", line 105, in create
    except self.model.DoesNotExist:

AttributeError: 'TestHandler' object has no attribute 'model'

The app is registered in settings.py. I have done syncdb multiple times. Restarted server. Restarted system and still can’t get this figured out.

  • 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-06-14T07:56:47+00:00Added an answer on June 14, 2026 at 7:56 am

    As the example was written:

    class AnonymousBlogpostHandler(AnonymousBaseHandler):
        model = Blogpost
        fields = ('title', 'content')
    

    You missed model.

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

Sidebar

Related Questions

I have this test code that just saves an XML file to a folder.
This is an example XML file that would come from the Android Client. <test>
My simple requirement: Reading a huge (> a million) line test file (For this
I have these (sample) lines in a HTML-file: test.ABC.test test.ABCD.test test.ABCE.test And this Ant
I have a haskell file test.hs. In this file I have written a function
I'm running this small C# test program launched from a pre-commit batch file private
This is just an early stage test of creating and writing a file to
I have one file (for example: test.txt), this file contains some lines and for
I have a file called 'removethese' who's contents looks like this: ./test_dir/file1 ./test_dir/file2 ./test_dir/file
I have this tag into my html file: {{block:my_test_block}} {{news:my_test_block2}} I need to parse

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.