mirror of
https://github.com/ferdzo/serviceCRM.git
synced 2026-04-04 21:06:24 +00:00
requirements.txt and update
This commit is contained in:
BIN
requirements.txt
Normal file
BIN
requirements.txt
Normal file
Binary file not shown.
@@ -6,7 +6,5 @@ class InsertTable(tables.Table):
|
||||
class Meta:
|
||||
model = Insert
|
||||
template_name = "serviceCRM/list.html"
|
||||
attrs = {'class':'table table-sm'}
|
||||
fields = ['id', 'name', 'phone', 'description', 'date', 'done', 'edit']
|
||||
edit = tables.TemplateColumn(template_name="serviceCRM/edit.html", verbose_name="edit", orderable=False)
|
||||
|
||||
edit = tables.TemplateColumn(template_name="serviceCRM/edit.html", verbose_name=("edit"), orderable=False)
|
||||
|
||||
@@ -19,7 +19,7 @@ from django.urls import path
|
||||
import serviceCRM.views as view
|
||||
|
||||
urlpatterns = [
|
||||
path("", view.List.as_view(), name="index"),
|
||||
path("", view.TableView.as_view(), name="index"),
|
||||
path('admin/', admin.site.urls),
|
||||
path("<int:question_id>/", view.ReportById.ReportById, name="detail"),
|
||||
path("insert/", view.InsertNew.insert, name="insert"),
|
||||
|
||||
@@ -6,6 +6,7 @@ from .tables import InsertTable
|
||||
from .models import Insert
|
||||
from django_tables2 import SingleTableView
|
||||
|
||||
|
||||
# from django.template import loader
|
||||
|
||||
def index(request):
|
||||
@@ -31,6 +32,7 @@ class ReportById(generic.DetailView):
|
||||
class InsertNew(generic.View):
|
||||
model = Insert
|
||||
template_name = "serviceCRM/form.html"
|
||||
|
||||
def insert(request):
|
||||
if request.method == 'POST':
|
||||
form = InputForm(request.POST)
|
||||
@@ -44,11 +46,10 @@ class InsertNew(generic.View):
|
||||
return render(request, InsertNew.template_name, {'form': form})
|
||||
|
||||
|
||||
class List(SingleTableView):
|
||||
class TableView(SingleTableView):
|
||||
model = Insert
|
||||
table_class = InsertTable
|
||||
template_name = 'serviceCRM/list.html'
|
||||
|
||||
template_name = "serviceCRM/list.html"
|
||||
|
||||
def done(request, question_id):
|
||||
req = get_object_or_404(Insert, id=question_id)
|
||||
|
||||
Reference in New Issue
Block a user