mirror of
https://github.com/ferdzo/serviceCRM.git
synced 2026-04-04 21:06:24 +00:00
Small updates
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -206,4 +206,5 @@ pyvenv.cfg
|
||||
pip-selfcheck.json
|
||||
.idea
|
||||
# End of https://www.toptal.com/developers/gitignore/api/venv,dotenv,intellij,pycharm
|
||||
serviceCRM/__pycache__
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
19
.vscode/launch.json
vendored
Normal file
19
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python Debugger: Django",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}\\manage.py",
|
||||
"args": [
|
||||
"runserver"
|
||||
],
|
||||
"django": true,
|
||||
"autoStartBrowser": false
|
||||
}
|
||||
]
|
||||
}
|
||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"cmake.configureOnOpen": false
|
||||
}
|
||||
BIN
requirements.txt
BIN
requirements.txt
Binary file not shown.
@@ -23,5 +23,4 @@ urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path("<int:question_id>/", view.ReportById.ReportById, name="detail"),
|
||||
path("insert/", view.InsertNew.insert, name="insert"),
|
||||
path("done/<int:question_id>", view.done, name="done"),
|
||||
]
|
||||
path("done/<int:id>/", view.done, name="done"),]
|
||||
|
||||
@@ -21,13 +21,12 @@ def index(request):
|
||||
#
|
||||
class ReportById(generic.DetailView):
|
||||
model = Insert
|
||||
template_name = "serviceCRM/id.html"
|
||||
template_name = "serviceCRM/python.exe -m pip install --upgrade pipid.html"
|
||||
|
||||
def ReportById(request, question_id):
|
||||
req = get_object_or_404(Insert, id=question_id)
|
||||
context = {"name": req.name, "phone": req.phone, "desc": req.description, "date": req.date}
|
||||
return HttpResponse(render(request, ReportById.template_name, context))
|
||||
|
||||
return HttpResponse(f"Report ID: {question_id} \nName: {req.name} \nPhone: {req.phone} \nDescription: {req.description} \nDate: {req.date} \nDone: {req.done}")
|
||||
|
||||
class InsertNew(generic.View):
|
||||
model = Insert
|
||||
@@ -48,11 +47,11 @@ class InsertNew(generic.View):
|
||||
|
||||
class TableView(SingleTableView):
|
||||
model = Insert
|
||||
table_class = InsertTable
|
||||
template_name = "serviceCRM/list.html"
|
||||
|
||||
def done(request, question_id):
|
||||
req = get_object_or_404(Insert, id=question_id)
|
||||
|
||||
def done(request, id):
|
||||
req = get_object_or_404(Insert, id=id)
|
||||
if req.isDone():
|
||||
return HttpResponse("Done")
|
||||
return HttpResponse("Not Done")
|
||||
|
||||
Reference in New Issue
Block a user