EmilStenstrom / django-components

Create simple reusable template components in Django.
MIT License
953 stars 59 forks source link

Doc bug: Imports in the view example #446

Closed tanssinet closed 3 weeks ago

tanssinet commented 4 weeks ago

In the documentation, the example urls.py says:

\#In a file called [project root]/components/urls.py
from django.urls import path
from calendar import Calendar

urlpatterns = [
    path("calendar/", Calendar.as_view()),
]

The default django config (with the instructions) does not appear to load this component, but would require in this case:

from components.calendar.calendar import Calendar