I am learning Django and I want to use namespaces. I want someone just to show me how to add namespaces to a current test project I am working on and explain to me the basics of how to use it.
Requirements:
The code is on GitHub and I can share the code for you to update. As such you would need to have an existing Github account so that I can add you as a collaborator for the project.
Here is what I have so far (This is without namespaces as I haven't been able to get it to work.
Extract from app [login to view URL]
from [login to view URL] import path, re_path
from . import views
urlpatterns = [
path('', [login to view URL], name = "index"),
]
project [login to view URL]
from [login to view URL] import admin
from [login to view URL] import path, include, re_path
import gallery
urlpatterns = [
path('admin/', [login to view URL]),
path('accounts/', include('[login to view URL]')),
path('index/', include('[login to view URL]')),
]
And lastly, this is my [login to view URL] file in my app folder
from [login to view URL] import render
from [login to view URL] import reverse
# Create your views here.
def index(request):
return render(request,"gallery/[login to view URL]")