1👍
✅
I don’t think a form is necessary for this, use a DetailView
.
url
urlpatterns = patterns('',
url(r'^faculty/(?P<slug>\w+)/$', FacultyDetail.as_view()),
)
view
from django.views.generic.detail import DetailView
class FacultyDetail(DetailView):
model = Faculty
slug_field = 'faculty_code'
More info:
Source:stackexchange.com