diff --git a/serviceCRM/forms.py b/serviceCRM/forms.py index 35570fc..f0536fd 100644 --- a/serviceCRM/forms.py +++ b/serviceCRM/forms.py @@ -11,8 +11,10 @@ class InputForm(forms.ModelForm): fields = {"name", "phone", "description", "date","done"} labels = {'name': "Name", 'phone': "Phone", 'date': "Date", 'description': "Description",'done':"Done"} widgets = { + 'name': forms.TextInput(attrs={'class':'form-control'}), + 'phone': forms.TextInput(attrs={'class': 'form-control'}), 'date': DateInput(), - 'description':forms.Textarea + 'description':forms.Textarea(attrs={'class': 'form-control'}) } field_order =["name", "phone", "date","description","done"] diff --git a/serviceCRM/templates/base.html b/serviceCRM/templates/base.html index b512db9..db05a7b 100644 --- a/serviceCRM/templates/base.html +++ b/serviceCRM/templates/base.html @@ -5,7 +5,6 @@ - Service @@ -13,11 +12,32 @@ + + +
+ + {% comment %}

Service CRM

+ +
{% endcomment %} +
-

Service CRM

-
{% block content %} {% endblock %}
diff --git a/serviceCRM/templates/serviceCRM/form.html b/serviceCRM/templates/serviceCRM/form.html index 9bfab79..af443c0 100644 --- a/serviceCRM/templates/serviceCRM/form.html +++ b/serviceCRM/templates/serviceCRM/form.html @@ -2,8 +2,10 @@ {% block content %} {% csrf_token %}
+
{% csrf_token %} {{form.as_p}} +
{% endblock%} \ No newline at end of file diff --git a/serviceCRM/urls.py b/serviceCRM/urls.py index 4f881a2..1cc1baf 100644 --- a/serviceCRM/urls.py +++ b/serviceCRM/urls.py @@ -19,10 +19,9 @@ from django.urls import include, path import serviceCRM.views as view urlpatterns = [ - path("", view.index, name="index"), + path("", view.List.as_view(), name="index"), path('admin/', admin.site.urls), path("/", view.ReportById.ReportById, name="detail"), path("insert/", view.InsertNew.insert, name="insert"), path("done/", view.done, name="done"), - path("list/", view.List.as_view(), name="list") ]