Application Project Manager

The project_manager application handles the management of the project on gitlab.

Key files of the « project_manager » application

admin.py

class apps.project_manager.admin.KanbanAdmin(model, admin_site)

Adding the PageContent table in the Django admin and customizing the rendering

model.py

class apps.project_manager.models.Kanban(id, title, description, kanban_json, note_json, dateCreation, dateLastUpdate, user)
exception DoesNotExist
exception MultipleObjectsReturned

test.py

class apps.project_manager.tests.TestProjectManager(methodName='runTest')
setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

test_ProjectManager()

Test project manager

view.py

apps.project_manager.views.kanban_detail(request, pk)

The function kanban_detail renders the details of a kanban object, including the kanban object itself, its primary key, and the gitlab username of the user if available.

Paramètres
  • request – The request object represents the HTTP request made by the user. It contains information such as the user’s session, the requested URL, and any data sent with the request

  • pk – The « pk » parameter is the primary key of the Kanban object that we want to retrieve and display the details for. It is used to identify the specific Kanban object in the database

Renvoie

a rendered HTML template with the context variables « Kanban », « pk », and « gitlab_username ».

apps.project_manager.views.kanban_list(request)

The function kanban_list retrieves all Kanban objects and renders them in a template called « project_manager_list.html ».

Paramètres

request – The request object represents the HTTP request made by the user. It contains information about the request, such as the method used (GET, POST, etc.), the headers, and the user’s IP address

Renvoie

a rendered HTML template called « project_manager_list.html » with a context variable « kanban_list » that contains all the objects from the Kanban model.