Opened 16 years ago
Closed 16 years ago
#9929 closed (invalid)
Admin form got a wrong action address via lighttpd with fastcgi.
Reported by: | khsing | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have done via this link http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/
The login form is appeared, but the action of login form is wrong. here is some configure files.
I think the action should be "/admin/", but I got "/nsman.fcgi/admin/". why?
- lighttpd.conf
fastcgi.server = ( "/nsman.fcgi" => ( "main" => ( "socket" => djp + "/nsman/nsman.sock", "check-local" => "disable", ) ), ) alias.url = ( "/media/" => "/usr/local/python25/lib/python2.5/site-packages/django/contrib/admin/media/", ) url.rewrite-once = ( "^(/media.*)$" => "$1", "^/favicon\.ico$" => "/media/favicon.ico", "^(/.*)" => "/nsman.fcgi$1" )
- urls.py
from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), )
- login from section.
<div id="content-main"> <form action="/nsman.fcgi/admin/" method="post" id="login-form"> <div class="form-row"> <label for="id_username">Username:</label> <input type="text" name="username" id="id_username" /> </div> <div class="form-row"> <label for="id_password">Password:</label> <input type="password" name="password" id="id_password" /> <input type="hidden" name="this_is_the_login_form" value="1" /> </div> <div class="submit-row"> <label> </label><input type="submit" value="Log in" /> </div> </form>
Note:
See TracTickets
for help on using tickets.
Read the documentation more thoroughly to see how to control this; if you have further usage questions, please take them to the django-users mailing list, since this bug tracker is not a forum for "how do I use Django?" questions.