This commit is contained in:
ferdzo
2024-03-15 00:33:03 +01:00
parent 0ac17fd747
commit 37db8f69ad
19 changed files with 21 additions and 9 deletions

3
.gitignore vendored
View File

@@ -205,4 +205,5 @@ pyvenv.cfg
.venv
pip-selfcheck.json
.idea
# End of https://www.toptal.com/developers/gitignore/api/venv,dotenv,intellij,pycharm
# End of https://www.toptal.com/developers/gitignore/api/venv,dotenv,intellij,pycharm
/_pycache_/

2
.idea/misc.xml generated
View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (serviceCRM)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (serviceCRM)" project-jdk-type="Python SDK" />
</project>

2
.idea/serviceCRM.iml generated
View File

@@ -16,7 +16,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.11 (serviceCRM)" jdkType="Python SDK" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,10 +1,13 @@
import django_tables2 as tables
from .models import Insert
from django_tables2.utils import A
class InsertTable(tables.Table):
class Meta:
model = Insert
template_name = "serviceCRM/list.html"
edit = tables.TemplateColumn(template_name="serviceCRM/edit.html", verbose_name="edit", orderable=False)
template_name = "list.html"
sequence = ("name", "phone", "description","date","done" )
delete = tables.LinkColumn('main:delete_item', args=[A('pk')], attrs={
'a': {'class': 'btn'}
})

View File

@@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"/>
<title>Service </title>

View File

@@ -0,0 +1,8 @@
{% extends 'base.html' %}
{% block content %}
{% load render_table from django_tables2 %}
{% render_table table %}
{% endblock%}

View File

@@ -1,7 +1,8 @@
{% extends 'base.html' %}
{% load render_table from django_tables2 %}
{% block content %}
{% load render_table from django_tables2 %}
{% render_table object_list %}
{% render_table table %}
{% endblock%}