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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:59:24+00:00 2026-06-06T04:59:24+00:00

How to build a login form on the startingpage within a little widget on

  • 0

How to build a login form on the startingpage within a little widget on the top left?

I want to have a stylish web 2.0 like login…on the upper right sliding in (like on dropbox.com)…so far the design part…

when it comes to the views and default login behavior of django (1.4) i can’t get myself to the right direction. I get the standart example to work with django.contrib.auth and so forth…
but what if i have my log-in widget on the first site:

(r’^$’, ‘myproject.views.home’)

I tried to integrate the form into my template (home.html) which looks like this:

<form action="/login/" method="post">{% csrf_token %}
        {% if next %}
        <input type="hidden" name="next" value="{{ next }}" />
        {% endif %}
        username:
        <input type="text" name="username" value="{{ username}}" /><br />
        password:
        <input type="password" name="password" value="" /><br />
                <input type="hidden" name="next" value="{{'something'}}" />
        <input type="submit" value="anmelden" />
    </form> 

my view looks like this:

def home(request):
    title='home'

    try:
         username = request.POST.get('username', '')
         password = request.POST.get('password', '')
         user = auth.authenticate(username=username, password=password)
         if user is not None and user.is_active:
        # Correct password, and the user is marked "active"
            auth.login(request, user)
        # Redirect to a success page.
            return HttpResponseRedirect("/im_in/")
        else:
        # Show an error page
            return HttpResponseRedirect("/im_not/")
    except:


        return render_to_response('home.html',locals()) 

[edit]
my urlconf:

urlpatterns = patterns('',

    (r'^$', 'edumin.views.home'),
)

My problem:

after submit django leads me to /login and says:

The current URL, login/, didn’t match any of these.

Any help or a good example of having a login on the first page…or a custom login which serves this purpose?

  • 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-06T04:59:26+00:00Added an answer on June 6, 2026 at 4:59 am

    Based on everything I see here, you don’t actually have anything at /login/ to catch the login, but instead are trying to log in via the current URL. In that case you should completely remove the action attribute from the login form.

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

Sidebar

Related Questions

I have successfully built a login form using ajax and want to add a
I want to have a login form on a charity website I am building
I want to build a login form that displays in a sidebar across every
I have a very simple question. In FB tutorial https://developers.facebook.com/docs/mobile/ios/build/ it starts to login
I have a web-based system built with user login data based on session variables.
I am trying to build a login form but the textfields and the submit
I work on a Symfony web application which has a standard login form. To
I've build a simple SpringMVC login system that works fine, but I want to
I'm attempting to build a login page for my website. I have managed to
I'm using jQuery to build simple animations for a login form in my CMS.

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.