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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:53:30+00:00 2026-06-18T05:53:30+00:00

I have in the html file a button defined as ; <input type=submit value=Log

  • 0

I have in the html file a button defined as ;

<input type="submit" value="Log In" name="login_button" style="width: 109px; "/>

This button is on the sample.com . USer comes and clicking on the this button, then current web page, http://127.0.0.1:8000/sample,is changed to the http://127.0.0.1:8000/sample2, defined on the login.html. For this reason, I have done ;

def auth(request):
  if 'login_button' in request.POST:
    // redirect the web page to the sample2.com
  return render_to_response('login.html', {} )

I have tried to redirect("http://127.0.0.1:8000/sample2), but it is not worked. How can I go to another page.

Other web page defined on the this function

  def message(request):
          current_date_T = Template ("<p style=\"text-align: right;\">\
                                {{Date|truncatewords:\"8\"}}\
                            </p>")

          # --
          return HttpResponse(html)

url file

  urlpatterns = patterns('',
            ('^sample2/$', message),
            ('^sample/$', auth),
  )

page opened first is sample, in it there is a button. Sample2 will be called after button on the sample is clicked.

  • 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-18T05:53:31+00:00Added an answer on June 18, 2026 at 5:53 am

    First of all define names to your urls:

    urlpatterns = patterns('',
        url('^sample2/$', message, name="message_view"),
        url('^sample/$', authentication, name="auth_view"),
    )
    

    Then use url reverse resolution technique to get the url of a view using name of url:

    def auth(request):
        if request.method == 'POST':
            // redirect the web page to the sample2.com
            return redirect(reverse('message_view'))
        return render_to_response('login.html', {} )
    

    I don’t know what is the purpose of redirect here. But thats how it works.

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

Sidebar

Related Questions

I have a page with File html input field and a Submit button as
I have a form that contains an html file browse button ( <input type=file
In my HTML I have something like this <input type=button value=Delete onclick=delete(this);/> and in
i have a Button on a HTML page . i want to attach file
Say I have: <div id=name class=button></div> and in a javacript file I define click
I have an html file with a hidden button. After i do a jquery
I have a form defined thus in a razor file. @using (Html.BeginForm()) { }
I have an ActiveX HTML Object as defined here: <object id=HSMBTPrintX1 width=350 height=350 classid=CLSID:68d05400-18a6-4b39-b3ff-a17d77c1eddf
Question: I have a form with a textbox, file browse(uploadify) and a submit button.
I have html-file. I have to replace all text between this: [%anytext%]. As I

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.