Redirect in Django admin page
In my django project, after activating the admin appl开发者_开发知识库ication, I canno't get access to the page localhost/soundaxis/admin because I'm redirected to localhost/admin.
I think the problem has to do with the fact that the project was not located at the base address.
Urls.py:
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^soundaxis/', 'views.index.home'),
(r'^soundaxis/admin/', include(admin.site.urls)),
)
Start the server by typing the following in the base dir: python manage.py runserver
then go to http://localhost:8000/
Its rather complicated to get the project to run off another subdirectory so I suggest running it from the base, especially during development. Later in the game you can try work it from a subdir if required, but better yet would be subdomain.
精彩评论