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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:21:57+00:00 2026-05-14T14:21:57+00:00

I am applying the ‘url’ template tag to all links in my current Django

  • 0

I am applying the ‘url’ template tag to all links in my current Django project.

I have my urls named like so…

url(r'^login/$', 'login', name='site_login'),

This allows me to access /login at my site’s root. I have my template tag defined like so…

<a href="{% url site_login %}">

It works fine, except that Django automatically resolves that url as /myprojectname/login, not /login. Both urls are accessible. Why? Is there an option to remove the projectname? This occurs for all url tags, not just this one.

  • 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-05-14T14:21:57+00:00Added an answer on May 14, 2026 at 2:21 pm

    Apparently, it was a problem with my apache2 configuration. I basically copied the directives from the django website, with one small modification:

    http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#basic-configuration

    I changed to so my Django project would be served at my site’s root directory.

    I had to remove ‘/mysite’ from the django.root option. My final output looks like this, with no value after django.root:

    <Location "/"> 
        SetHandler python-program 
        PythonHandler django.core.handlers.modpython 
        SetEnv DJANGO_SETTINGS_MODULE mysite.settings 
        PythonOption django.root 
        PythonDebug On 
    </Location> 
    

    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 here: http://groups.google.com/group/django-users/msg/5e79ed1e694a3776

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

Sidebar

Related Questions

When applying a multi-project Gradle structure to our project, my settings.gradle looks like this:
I'm applying the following example http://jsoup.org/cookbook/extracting-data/example-list-links to list links. package org.jsoup.examples; import org.jsoup.Jsoup; import
I have some javascript applying changes to some elements and a function loading more
I thought of applying Dependency Injection and use Unity in the Project I am
I'm applying the strikeout tag: <s>$5,000,000</s> But the line is too low.. .it's about
I'm applying a blur effect to an image in WPF like so: <Image ClipToBounds=True>
I have recently started applying for .Net jobs. I currently work in a sales
[SOLVED]: Applying proper list iteration procedure fixed problem. (Shown below) I currently have a
I'm applying a filter on a datasource and I want to retrieve all the
I am having trouble applying openmp to a nested loop like this: #pragma omp

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.