Django - include app urls

前端 未结 5 1660
余生分开走
余生分开走 2021-02-20 01:48

I have the following structure (Django 1.4):

containing_dir/
    myproject/
        myapp1/
        myapp2/
        myapp3/

myproject, myapp1,

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-20 02:46

    Does ROOT_URLCONF need to point to myproject.urls?

    If you place your apps inside of myproject you need to use the proper view prefix.

    urlpatterns = patterns('myproject.myapp1',
    ...
    

提交回复
热议问题