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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:23:35+00:00 2026-05-29T19:23:35+00:00

If I have following url conf: urlpatterns = patterns(”, url(r’^projects-json$’, ‘projects.views.list’), ) And I

  • 0

If I have following url conf:

urlpatterns = patterns('',
    url(r'^projects-json$', 'projects.views.list'),
)

And I go to /projects-json URL resolves fine. Note there is no trailing slash.

But I want to have a dot, not a hyphen in URL, so I rewrite url conf in this way:

urlpatterns = patterns('',
    url(r'^projects\.json$', 'projects.views.list'),
)

Now if I go to /projects.json I get redirected to /projects.json/ and get 404 as a consequense! If I add a trailing slash in url pattern I will get OK response at URL with the trailing slash. But I just want one simple thing: to match /projects.json without any redirects and slashes. Can Django do this? I’ve lost so many time for this primitive issue. Could anyone spot a mistake?

settings.APPEND_SLASH = False. However looks like it doesn’t matter. Just in case it could matter:

MEDIA_ROOT = ''
MEDIA_URL = '/media/'
ADMIN_MEDIA_PREFIX = '/admin-media/'
  • 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-29T19:23:39+00:00Added an answer on May 29, 2026 at 7:23 pm

    Works fine for me (with APPEND_SLASH = False). It can be browser issue, some browsers (Firefox for example) cache redirects, so it will redirect you after there is no redirect at all at server. Try it in another browser.

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

Sidebar

Related Questions

I have the following urlconf: urlpatterns = patterns('page.manager.views', url(r'^$', 'pages', name='page_manager-pages'), url(r'^add/$', 'add_page', name='page_manager-add_page'),
I have following settings URL urlpatterns = patterns('', (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_DOC_ROOT}), url(r'^index/$','pMass.views.index', name='index'),
I have the following CSS .ul{ list-style-image:url(/images/bullet.png) } My bullet.png is 20 x 20px
I have a URL conf such as this: url(r'^value-toggle/(?P<profile_id>\d{1,10})/(?P<on_or_off>on|off)/$', 'clipfo.profile.views.value_toggle', name='value-toggle'), In my template,
I am trying to install ruby-mp3info. I have the following URL from which I
How do I make the following url forbidden in apache; main/index.php?site=ing I have tried
I have the following code to download a URL through a proxy: proxy_handler =
i have the following script css: img { background-image:url(man.png); background-repeat:no-repeat; padding-top:6px; padding-bottom:60px; padding-left:10px; padding-right:10px;
I have the following CSS code .editable:before { content: url(../images/icons/icon1.png); padding-right:5px; } this is
I have the following code making a GET request on a URL: $('#searchButton').click(function() {

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.