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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:26:39+00:00 2026-06-12T18:26:39+00:00

I am creating a login process from iphone to django server. I made Session

  • 0

I am creating a login process from iphone to django server.

I made Session class using class method, httprequest wrapper using json.

but I don’t know. How can I get session information and matching server session?

if I get session information, (just example pseudo code)

def function(username, password)
    if is_authenticate(username, password) == true
        login(username, password)
        #What send value to iphone 
        return returnValue(session_id)

How can I send session_id?

This is Login Function

    def sign_in(request):
     if request.method=='POST':
         username = requset.POST['username']
         password = request.POST['password']
         user = authenticate(username=username, password=password)
         list = []
         if user is not None:
             if user.is_activate:
                 try:
                     login(request,user)
                     list.append( {'fields':
                                        {'login_status':'login success'},})
                 except:
                     list.append( {'fields':
                                        {'login_status':'login fail'},})



returnValues = json.dumps(list,cls=DjangoJSONEncoder)
return HttpResponse(returnValues)
  • 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-12T18:26:41+00:00Added an answer on June 12, 2026 at 6:26 pm

    Typically the session identifier will get set as a cookie, automatically if you use the default NSURLCONNECTION and NSURLRequest, as for session data, that lives on the server and if you want access to it on your iPhone you will have to develop some sort of API, be it rest based or soap or less formally defined.

    So the workflow may be something like

    iPhone sends login request: sever responds ok… Set cookie some session data.

    iPhone sends userData request: sever responds with Json structure of user data.

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

Sidebar

Related Questions

I'm creating my first login process in CodeIgniter. I'm using the simpleloginsecure library for
I am trying to execute a batch file from C# code using Process class.
We are new to ROR, We have issue in creating Login/Logout process in ROR
I am creating a login system for a web application using PHP. My question
I'm creating a login for a website using PHP but when I try to
I have my CI build process successful creating a MSI using WIX by calling
I am creating a login register page which contains two edit text boxes(one for
I've been reading this post Creating a login form in CodeIgniter based on Ion
I learned about $_SESSION about several weeks ago when creating a login page. I
I have just finished creating an entire login and register systsem in PHP, but

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.