This is my model
class showroom(models.Model):
serialno=models.IntegerField(db_index=True,primary_key=True)
carname=models.CharField(max_length=50)
carmodel=models.CharField(max_length=50)
price=models.IntegerField()
rating=models.IntegerField(validators=[MinValueValidator(1),MaxValueValidator(5)])
This is my forms.py
class RegisterForm(ModelForm):
class Meta:
model = showroom
fields =("__all__")
views.py
class carform(CreateView):
model = showroom
form_class=RegisterForm
template_name = "carbrand/carregister.html"
context_object_name='registerform'
html page
{% block content %}
{{registerform}}
{% endblock content %}
It's just showing a blank screen. I have imported all the necessary classes and views. It will make this too long for you so i removed it.can anyone please tell me if anything wrong in my view/form.