I have a "NoReverseMatch" error. How can I solve this?
path('orders/', include('orders.urls')),
from .views import chack_out
path('chack_out/', chack_out, name='chack_out')
def chack_out(request):
.....
<form action="{% url 'orders:chack_out' %}" method="POST">
{% csrf_token %}
Add the desired namespace to the urls.py file:
path('orders/', include('orders.urls', namespace='orders')),
or set the app_name attribute inside the ordres/urls.py file:
from .views import chack_out
app_name = 'orders'
urlpatterns = [
path('chack_out/', chack_out, name='chack_out')
]
Check out the documentation for URL namespaces.