Yea! This toolbar is an awesome tool thanks for the tip. So now I guess I'm not understanding how to route url's really. The a href is:
So I don't understand either how to just pull the param without the edit/circuit/ part or can that be stripped before it is passed to the view?
-- <a href="/viewLit/edit/jira/{{record.circuitid}}" class="edit-item" target="blank" title="Edit">Edit Jira Info</a><br>
My project level urls.py is:
my editLit urls.py is:
And finally my editLit views.py is:
from django.contrib import adminfrom django.urls import path, includefrom django.conf.urls import urlimport debug_toolbar
urlpatterns = [ path('admin/', admin.site.urls), path('', include('homepage.urls')), path('searchlit/', include('searchLit.urls')), path('viewLit/edit/', include('editLit.urls')), path('viewLit/', include('viewLit.urls')), path('edit/', include('editLit.urls')), path(r'^__debug__/', include(debug_toolbar.urls)),]
from django.urls import path, includefrom django.conf.urls import urlfrom . import views
urlpatterns= [ path('edit/circuit/<str:circuitid>', views.editLit.as_view(),name='editLit'),]
And finally my editLit views.py is:
class editLit(UpdateView): pk_url_kwarg = 'circuitid' model=Circuitinfotable template="/editLit/editCircuit.html" fields = '__all__'
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9685efa1-b9b1-46e2-b831-d6144e0ebdf2%40googlegroups.com.
No comments:
Post a Comment