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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:52:58+00:00 2026-06-18T15:52:58+00:00

In django / django / contrib / admin / templates / admin / login.html

  • 0

In django / django / contrib / admin / templates / admin / login.html, the action path of the form is {{ app_path }}. What does it mean? Besides, in change_password_form, there is no action path at all. How can the form still work?

  • 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-18T15:53:00+00:00Added an answer on June 18, 2026 at 3:53 pm

    {{ app_path }} is a template variable will be replaced with the context passed to it from the view. In this case the view is in django/contrib/admin/sites.py:

    @never_cache
    def login(self, request, extra_context=None):
        """
        Displays the login form for the given HttpRequest.
        """
        from django.contrib.auth.views import login
        context = {
            'title': _('Log in'),
            'app_path': request.get_full_path(),
            REDIRECT_FIELD_NAME: request.get_full_path(),
        }
        context.update(extra_context or {})
    
        defaults = {
            'extra_context': context,
            'current_app': self.name,
            'authentication_form': self.login_form or AdminAuthenticationForm,
            'template_name': self.login_template or 'admin/login.html',
        }
        return login(request, **defaults)
    

    so {{ app_path }} will be replaced with the value returned by request.get_full_path(), which is path where the request comes from. In this case it’s just the URL from which you loaded the form in the first place.


    To the second question, an action of an empty string points the form at the URL the browser currently has loaded.

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

Sidebar

Related Questions

My URLs for my application looks like this: (r'^admin/', include(admin.site.urls)), (r'^contractManagement/login', 'django.contrib.auth.views.login', {'template_name': 'login.html'},()),
The Django documentation states the following clearly: Not every template in contrib\admin\templates\admin may be
i 've the following folder structure src\BAT\templates\admin\base.html src\BAT\media\base.css src\BAT\media\admin-media\base.css settings.py MEDIA_ROOT = os.path.join( APP_DIR,
I'm using django.contrib.admin in one of my apps. my models: class Gallery(models.Model): location =
I recently extended with UserProfile so my admin.py looks like this: from django.contrib import
Reading about Django, I saw this: http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#ref-contrib-admin - the fancy simple to use admin
I'm using django.contrib.auth.views.login to log in users. When login is failed, the user and
I have a form like so: from django import forms from django.contrib.auth.models import User
I am trying to customize Django's comments form. Inside django.contrib.comments.forms I noticed that all
I've set: ADMIN_MEDIA_PREFIX = 'C:/Python27/Lib/site-packages/django/contrib/admin/media/' And in admin panel I've got such links to

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.