Hello there, this time i just wanna show how to use a dinamic path url in templates django. Before it, this hasbeen asked and aswered by someone in stackoverflow.

There is simply how to manage it, and usefull for templates django.

  1. In your urls.py
from django.conf.urls import include, url
from . import views

urlpatterns = [
    url(r'^accounts/transaksi/new/$', views.TransaksiViews().new_transaksi_member, name="new_transaksi_member_page"),
  1. In your templates.html, change your: request.get_full_path

         Kirim Transaksi

to request.resolver_match.url_name, there is simply ro resolve from your name of url.

         Kirim Transaksi

Helpfully can help..


146 7 7 0