I'm currently trying to add a Link column
into a table that I have created already using Django tables 2.
I'm using the following code from the documentation
class PeopleTable(tables.Table):
name = tables.LinkColumn('people_detail', text='static text', args=[A('pk')])
view.py
urlpatterns = patterns('',
url('people/(\d+)/', views.people_detail, name='people_detail')
)
The problem is, when i try to load my webpage i get the following error:
Reverse for 'people_detail' with arguments '(1,)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Can anyone see the problem here?
EDIT: My url.py looks like the following:
urlpatterns = [
url(r'^$', views.IndexView, name='index'),
url(r'^Search/$', views.SearchView, name='Search'),
url(r'^people/(\d+)/$', views.myview,{}, name='people_detail'),
url(r'^comment/$', views.LicenseComment, name='comment'),
url(r'^copyLicense/$', views.copyLicense, name='Copy'),
url(r'^download/$', views.download, name='Download'),
url(r'^AddMod/$', views.addModule, name='addMod'),
url(r'^removeMod/$', views.removeModule, name='removeMod'),
url(r'^login/$', views.Login.as_view(), name='login'),
url(r'^logout/$', views.LogOut, name='logout'),
url(r'^create/$', views.get_name, name='create'),
url(r'^NewLicense/$', views.NewLicense.as_view(), name='NewLicense'),
url(r'^LicenseCharts/$', views.Chart.as_view(), name='ViewChart'),
url(r'^Advancedsearch/$', views.Adsearch.as_view(), name='AdSearch'),
url(r'^AdvancedRequest/$', views.AdvancedRequest, name='AdvancedRequest'),
url(r'^EditLicense/$', views.EditLicense.as_view(), name='EditLic'),
url(r'^Profile/$', views.profileView.as_view(), name='profile'),
url(r'^GlobalLog/$', views.LogFile.as_view(), name='LogFile'),
]
Also if i remove the text='static files'
from where i create the link column, this error no longer appears, but the table just contains a column called Name that contains only a dash