Maybe the solution is here https://docs.djangoproject.com/en/2.2/ref/urlresolvers/#django.core.urlresolvers.reverse https://stackoverflow.com/questions/13202385/django-reverse-with-arguments-and-keyword-arguments-not-found
Add a name at this view, and return a reverse with kwargs Good luck Missatge de Most. Runa <most.run...@gmail.com> del dia dg., 1 de set. 2019 a les 22:44: > now i am hot > > On Friday, June 14, 2019 at 4:15:51 AM UTC-7, Rohit Thapliyal wrote: >> >> Here's the Django view: >> def get_date(request): >> if request.method == 'POST': >> form = DateForm(request.POST) >> if form.is_valid(): >> date = form.cleaned_data['date'] >> print(type(date)) >> return HttpResponseRedirect('schedule/{date}') >> >> else: >> form = DateForm() >> >> return render(request, 'app/date.html', {'form': form}) >> >> Here is the urls.py file: >> from django.urls import path >> from . import views >> >> urlpatterns = [ >> path('', views.get_date), >> path('schedule/<int: date>', views.get_slot), >> ] >> >> >> *I want to hit the date URL via the get_date view. But this results in >> error.* >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/670b9fef-8871-4a18-b452-c436d5422f34%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/670b9fef-8871-4a18-b452-c436d5422f34%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK-JoTTKQo0_b97MFcDO%2B1eLQFT7EMPxguqYVyfwo-Xr23%2Be%2BQ%40mail.gmail.com.