class PetAddView(CreateView):
model = Pet
fields = ['name','animal_type','breed','color','age','height','price','city','sex','photo']
template_name = 'pets/pet-add.html'
There's my create view.
My goal is to provide view with functionality to create record in database. Bu I don't need my users to specify slug instead I need to set it automatically from specified "name" value.
Can I?