Project name inserted automatically in url when using django template url tag -
I am implementing all the links 'url' template tags in my existing Django project.
I have names like my URL ...
url (r '^ login / $', 'login', name = 'site_login'),
This allows me to log in at the root of my site. I have defined my template tag as ...
It works fine, except that Django automatically resolves the URL as / myprojectname / login , / login . Why are both URLs accessible? Is there an option to remove the name of the project? This is for all the URL tags, not just this
itemprop = "text">
Obviously, this was a problem with my apache2 configuration. I originally copied the instructions from the Dinggo website with a small revision of the instructions:
I changed my Django project to my site's root directory.
I had to remove the '/ mysite' from the DNS option. Without any value after Django.root, my final output looks like this:
& lt; Place "/" & gt; SetHandler Python-program PythonHandlerDeGengo.core handlers.modpythonSetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonOption django.root on Pythonbub & lt; / Location & gt;
For the record, I am running:
Django 1.0 Apache 2.2 mod_python 3.3.1 (I think ... :)) Ubuntu Hardy 8.04.4
Copied from:
Comments
Post a Comment