oscarmlage / django-cruds-adminlte

django-cruds is simple drop-in django app that creates CRUD for faster prototyping
BSD 3-Clause "New" or "Revised" License
424 stars 82 forks source link

error when add new costumer #60

Closed Jen-Persly closed 4 years ago

Jen-Persly commented 6 years ago

I found error when I try to add (create) new costumer this the error message

IntegrityError at /lte/testapp/customer/create (1048, "Column 'time' cannot be null")

screen shot 2018-02-23 at 16 05 15
migue56 commented 6 years ago

Hi Jen-Persly. Well, compare the crud view fields with the models fields. To use all your models fields on the createview, you need to set it on the view of "Customer" :
fields = '__all__' or comment it #fields = '__all__' to cruds-adminlte set the default __all__


class CustomerCRUD(CRUDView):
#fields = [ #list of fields]  # default all with '__all__'