Include mainsite
's urlpatterns
This commit is contained in:
parent
10f29d8264
commit
f8d6be1c25
2 changed files with 9 additions and 3 deletions
|
@ -13,9 +13,13 @@ Including another URLconf
|
||||||
1. Import the include() function: from django.conf.urls import url, include
|
1. Import the include() function: from django.conf.urls import url, include
|
||||||
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url, include
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
|
import mainsite.urls
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^admin/', admin.site.urls),
|
url(r'^admin/', admin.site.urls),
|
||||||
|
url(r'^', include(mainsite.urls.urlpatterns)),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
from .views import YearView
|
from . import views
|
||||||
|
|
||||||
|
app_name = 'manisite'
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^(?P<year>\d{4})-(?P<nYear>\d{4})/',
|
url(r'^(?P<year>\d{4})-(?P<nYear>\d{4})/',
|
||||||
YearView.as_view(), name='year_view'),
|
views.YearView.as_view(), name='year_view'),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue