Redirect root to exercises
This commit is contained in:
parent
ae1f00ef27
commit
6d38be0851
2 changed files with 9 additions and 1 deletions
|
@ -14,9 +14,12 @@ Including another URLconf
|
||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import include, path, re_path
|
from django.urls import include, path
|
||||||
|
|
||||||
|
from workout_suggest.views import home
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
path("", home, name="home"),
|
||||||
path("exercises/", include("exercises.urls", namespace="exercises")),
|
path("exercises/", include("exercises.urls", namespace="exercises")),
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
]
|
]
|
||||||
|
|
5
src/workout_suggest/views.py
Normal file
5
src/workout_suggest/views.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from django.shortcuts import redirect
|
||||||
|
|
||||||
|
|
||||||
|
def home(request):
|
||||||
|
return redirect("exercises:base")
|
Loading…
Reference in a new issue