WebFaction
Community site: login faq

I'm trying to include another urlconf (https://docs.djangoproject.com/en/1.3/topics/http/urls/#including-other-urlconfs) in my main urls.py file at django/myproject/urls.py

In django/myproject/urls.py: url(r'^', include('myproject.app.urls'))

In django/myproject/app/urls.py: url(r'^$', 'some_view')

This throws the error 'str' object is not callable when I go to the '^' URL in my browser. I tried importing myproject.app and changed url(r'^', include('myproject.app.urls')) to url(r'^', include(app.urls)), but this says that app had no module named error.

Please let me know if you have further questions. Thanks.

asked 30 Dec '11, 19:50

gwintrob
134
accept rate: 0%


That is a syntax error. From the code you provide it looks like it would be the 'django/myproject/app/urls.py' file with an issue, what is the value of 'some_view'? If this is a string, than perhaps your not importing the view correctly. Seeing the code and track-back in real time would allow us to see more info. You may submit a support ticket with this information if you would like us to take a look.

permanent link

answered 31 Dec '11, 17:17

johns
5.4k312
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×32
×3
×2

question asked: 30 Dec '11, 19:50

question was seen: 4,990 times

last updated: 31 Dec '11, 17:17

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM