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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:13:27+00:00 2026-05-16T01:13:27+00:00

I am trying to get the following setup up going. Flatpages: Where all my

  • 0

I am trying to get the following setup up going.

  1. Flatpages: Where all my static sites are (like: about, contact,..)

  2. Dynamic Pages:

Here I am trying to link from one of the Flatpages to a start site:

the regex in the url conf of this startsite I tried was:

(r'^myapp/start/(\d+)/$', 'mysite.views.def_that_should_just_show_hello_world'),

In the views I had:

def def_that_should_just_show_hello_world(request):
 return HttpResponse("Hello experiment world")

If I go to

/myapp/ I get 404: No FlatPage matches the given query.
/myapp/start/ I get 404: No FlatPage matches the given query.
/myapp/start/1 I get

Exception Type: TypeError
def_that_should_just_show_hello_world takes exactly 1 argument (2 given)

I thought with this setup I would get “Hello experiment world” on EVERY page.

Where did I go wrong?
I dont understand the multiple sites approach in regexs.
What would I have to do to print hello world on all these sites?
And then, what would I have to do to display 1 image on all of these sites?

Thanks a lot for the help!

  • 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-16T01:13:28+00:00Added an answer on May 16, 2026 at 1:13 am

    You regular expression has a matching group in it – the (\d+) bit.

    This requires one or more numeric characters to appear at the end of the url for that view. If you do not include the number at the end, this regular expression will not match the url. (url matching works like any other regular expression matching).

    When you do include the number, eg. /myapp/start/1 you then have another problem. Because there is a matching group, the part of the url in the brackets will be passed as another argument to your view. Views are always passed the request as their first parameter but in this case the ‘1’ matched by the (\d+) is provided as a second argument. This is why you are hetting the TypeError in this case.

    Django’s documentation has a lot of information on how url dispatching works, read that through and see if that makes sense!

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

Sidebar

Related Questions

I am trying to setup my swap chain Buffer but I get the following
I'm currently trying to get a automatic PyDev/nosetests/GAE setup going in Eclipse, verifying with
I'm trying to get the premailer gem working by following these instructions I've setup
I'm trying to 'loop' through results like the following html is setup with javascript.
I'm trying to get the following code to work using both Watin and HttpWatch.
I am trying to get the following regex to work on ios in order
I am trying to get the following code to work: if (isset($_POST['file'])){ if(file_exists($_POST['file'])){ echo
I'm trying to get the following regex to work on my String: Pattern Regex
I am trying to get the following form submission to show alert box if
As the title says, I am trying to get the following Javascript working in

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.