I have a Django site in a subdirectory as follows (via fcgi) - (using
ver 0.96 pre via svn)
When I go into the Admin area as follows
The login form that comes up has action="/admin/" (not "/dj/admin"), so
the post goes to
which is not the Django site. Somehow the /dg/ subdirectory info is
not prefixed to the form action. Is there a configuration with the
main site prefix that I'm missing somwhere, I ony see path to media to
be set in tte seetings?
Thanks
Hi Yatla,
Are you using an .htaccess file? I have a site on Dreamhost in which
my Django app live under a sub-url like this:
http://mydomain.com/galeria/
In my .htaccess file (in the 'galeria' folder of the domain) I have
the following rules:
RewriteEngine On
RewriteRule ^(media/.*)$ - [L]
RewriteCond %{REQUEST_URI} !(django.fcgi)
RewriteRule ^(.*)$ django.fcgi/galeria/$1 [L]
Remember that in your urls.py file you will need to include the admin
urls like this:
(r'^galeria/admin/', include('django.contrib.admin.urls')),
Hope it helps.
Regards,
Jorge
Many thanks! I was using an .htaccess in the subdirectory, but did not
have the subdirectory specified after the fcgi file in the last rewrite
rule. I don't know much about this so just copied from a tutorial on
this that did not have the subdirectory in the rewriterule. Thanks
again!
btw, it seems to work correctly whether I had the subdirectory in front
of the admin/ or not in the url.py file, ie, just
(r'^admin/', include('django.contrib.admin.urls')),
seems to work after I modified the rewriterule.
Yatla
Turns out that I did need to modify the url as you indicated like
(r'^galeria/admin/', include('django.contrib.admin.urls')),
the first time the site or my browser must have been caching something
and it seemed to work.
Now onwards to build the site
Yatla