Managing Profiles on Django Admin Interface

Hint

Click the collapsible-item-arrow button below to view the contents

The Django Admin interface provides a robust and user-friendly way to manage the ProfileType, Component, RecordActionButton and TitleButton models which are used to define and manage profiles in COPO.

See the Profile Configuration and Setup using Python and Django section for more information on setting up profiles before proceeding with this section.

By navigating to http://127.0.0.1:8000/admin/ and logging in with your superuser credentials, you can easily view, add, edit and delete the models that you have created with the management commands in the section, 5. Automating Profile Creation with manage.py.

Utilising the search, filter, and custom actions features enhances the efficiency of managing your data. By customising the admin interface, you can tailor it to your specific needs, making it an invaluable tool for Django development and administration.


Registered Models on Django Admin Interface

Django Admin Interface: Viewing Profile type, Components, Record action button and Title button registered models


Viewing data

Click the Profile types, Components, Record action buttons or the Title buttons link in the admin dashboard shown in the image above. This will take you to a list view of the respective model.

Profile types list view
List view of Profile types on Django Admin Interface

Component list view
List view of Components on Django Admin Interface

Record action buttons list view
List view of Record action buttons on Django Admin Interface

Title buttons list view
List view of Title buttons on Django Admin Interface

Adding data

  • Click the Add button in the top right corner of the respective model

  • Fill out the form fields as defined in the respective model.

  • Click the Save button to create the new data.


Editing data

  • In the list view, click on the name of the item that you would like to edit.

  • Modify the fields as needed.

  • Click the Save button to update the data


Deleting data

  • In the list view, select the checkbox next to the item(s) that you would like to delete.

  • Select Delete selected item from the action dropdown menu and click Go.

  • Confirm the deletion in the next screen.


Using the Search and Filters

Search

Use the search box at the top of the list view to search for profiles by name or email. This is useful for quickly finding specific profiles.

Filters

Use the filters on the right side of the list view to filter profiles by specific criteria such as birth_date.

This helps in narrowing down the list to profiles matching certain conditions.