0

I apologise for yet another simple Django question but I cannot find what I'm after.

Project: footystats
App: stats

What I'm trying to do is defer all URL mapping to the app so I have url.py in footystats which contains the following:

    ..
    urlpatterns = patterns('',
                           url(r'^', include(stats.urls), namespace = 'stats')
    )
    ..

When I try to open the main page I get the following error:

NameError at /main/

name 'stats' is not defined

Request Method: GET
Request URL: redacted/main/
Django Version: 1.6.1
Exception Type: NameError
Exception Value: name 'stats' is not defined

Exception Location: c:\django\footystats\footystats\urls.py in , line 8
Python Executable: C:\Python27\python.exe
Python Version: 2.7.6
Python Path: ['c:\django\footystats',
'C:\Python27\Lib\site-packages\django',
'C:\Windows\system32\python27.zip',
'C:\Python27\DLLs',
'C:\Python27\lib',
'C:\Python27\lib\plat-win',
'C:\Python27\lib\lib-tk',
'C:\Python27',
'C:\Python27\lib\site-packages']

Is this enough to go on? Do you need more information?

Thanks

3
  • 1
    did you import stats yet? if not you can import it or change stats.urls for 'stats.urls' Commented Jan 21, 2014 at 2:24
  • Meh I knew it was stupid. Thank you! Do you think I should get rid of this question? Its a bit specific Commented Jan 21, 2014 at 2:30
  • @Igrevenl Yeah, i think it's too localized. You can just accept the answer though. Commented Jan 21, 2014 at 2:32

1 Answer 1

1

Have you imported stats yet? if not you can import it or change stats.urls for 'stats.urls'

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.