update
This commit is contained in:
1 parent
f6054c587c
commit
c738c1746a
23 files changed
+497
-493
No files matched your search
@@ -14,9 +14,37 @@ Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
]
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.views.generic import RedirectView
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
|
||||
urlpatterns = (
|
||||
[
|
||||
path("admin/", admin.site.urls),
|
||||
path("", RedirectView.as_view(url="/admin/", permanent=False)),
|
||||
]
|
||||
+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
)
|
||||
# from django.contrib import admin
|
||||
# from django.urls import path, include
|
||||
#
|
||||
# from django.conf import settings
|
||||
# from django.conf.urls.static import static
|
||||
#
|
||||
#
|
||||
# urlpatterns = (
|
||||
# [
|
||||
# path("admin/", admin.site.urls),
|
||||
# path(
|
||||
# "",
|
||||
# include("app.urls"),
|
||||
# ),
|
||||
# ]
|
||||
# + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
# + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
# )
|
||||
|
||||
Reference in new issue
Block a user