Skip to content

Commit

Permalink
add navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jun 18, 2024
1 parent 5961308 commit abb890c
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 1 deletion.
2 changes: 1 addition & 1 deletion edc_qareports/auth_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


custom_codenames = [
"edc_qareports.qareports_section",
"edc_qareports.nav_qareports_section",
]

qa_reports_codenames.extend(custom_codenames)
Expand Down
22 changes: 22 additions & 0 deletions edc_qareports/migrations/0004_alter_qareportnote_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.2.11 on 2024-06-18 02:03

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("edc_qareports", "0003_alter_qareportnote_options_and_more"),
]

operations = [
migrations.AlterField(
model_name="qareportnote",
name="status",
field=models.CharField(
choices=[("New", "New"), ("feedback", "Feedback")],
default="New",
max_length=25,
),
),
]
129 changes: 129 additions & 0 deletions edc_qareports/migrations/0005_edcpermissions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Generated by Django 4.2.11 on 2024-06-18 02:36

import _socket
from django.db import migrations, models
import django_audit_fields.fields.hostname_modification_field
import django_audit_fields.fields.userfield
import django_audit_fields.fields.uuid_auto_field
import django_audit_fields.models.audit_model_mixin
import django_revision.revision_field


class Migration(migrations.Migration):

dependencies = [
("edc_qareports", "0004_alter_qareportnote_status"),
]

operations = [
migrations.CreateModel(
name="EdcPermissions",
fields=[
(
"revision",
django_revision.revision_field.RevisionField(
blank=True,
editable=False,
help_text="System field. Git repository tag:branch:commit.",
max_length=75,
null=True,
verbose_name="Revision",
),
),
(
"created",
models.DateTimeField(
blank=True, default=django_audit_fields.models.audit_model_mixin.utcnow
),
),
(
"modified",
models.DateTimeField(
blank=True, default=django_audit_fields.models.audit_model_mixin.utcnow
),
),
(
"user_created",
django_audit_fields.fields.userfield.UserField(
blank=True,
help_text="Updated by admin.save_model",
max_length=50,
verbose_name="user created",
),
),
(
"user_modified",
django_audit_fields.fields.userfield.UserField(
blank=True,
help_text="Updated by admin.save_model",
max_length=50,
verbose_name="user modified",
),
),
(
"hostname_created",
models.CharField(
blank=True,
default=_socket.gethostname,
help_text="System field. (modified on create only)",
max_length=60,
verbose_name="Hostname created",
),
),
(
"hostname_modified",
django_audit_fields.fields.hostname_modification_field.HostnameModificationField(
blank=True,
help_text="System field. (modified on every save)",
max_length=50,
verbose_name="Hostname modified",
),
),
(
"device_created",
models.CharField(blank=True, max_length=10, verbose_name="Device created"),
),
(
"device_modified",
models.CharField(
blank=True, max_length=10, verbose_name="Device modified"
),
),
(
"locale_created",
models.CharField(
blank=True,
help_text="Auto-updated by Modeladmin",
max_length=10,
null=True,
verbose_name="Locale created",
),
),
(
"locale_modified",
models.CharField(
blank=True,
help_text="Auto-updated by Modeladmin",
max_length=10,
null=True,
verbose_name="Locale modified",
),
),
(
"id",
django_audit_fields.fields.uuid_auto_field.UUIDAutoField(
blank=True,
editable=False,
help_text="System auto field. UUID primary key.",
primary_key=True,
serialize=False,
),
),
],
options={
"verbose_name": "Edc Permissions",
"verbose_name_plural": "Edc Permissions",
"abstract": False,
},
),
]
1 change: 1 addition & 0 deletions edc_qareports/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from .edc_permissions import EdcPermissions
from .qa_report_model_mixin import QaReportModelMixin
from .qa_report_note import QaReportNote
9 changes: 9 additions & 0 deletions edc_qareports/navbar_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from edc_navbar import NavbarItem

qa_navbar_item = NavbarItem(
name="qa_reports_home",
title="QA Reports",
label="QA",
codename="edc_qareports.nav_qareports_section",
url_name="meta_reports_admin:index",
)

0 comments on commit abb890c

Please sign in to comment.