Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A clear and concise description of what you expected to happen (or code).
3. And then the bug happens!

**Environment**
- Drive version:
- Message version:
- Platform:

**Possible Solution**
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,10 @@ showmigrations: ## show all migrations for the messages project.
@$(MANAGE_DB) showmigrations
.PHONY: showmigrations

superuser: ## Create an admin superuser with password "admin"
superuser: ## Create an admin superuser with password "admin" and promote user1 as superuser
@echo "$(BOLD)Creating a Django superuser$(RESET)"
@$(MANAGE_DB) createsuperuser --email admin@admin.local --password admin
@$(MANAGE_DB) createsuperuser --email user1@example.local --password user1
Comment thread
jbpenrath marked this conversation as resolved.
.PHONY: superuser

shell-back: ## open a shell in the backend container
Expand Down
12 changes: 11 additions & 1 deletion src/backend/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,21 @@ class ThreadAccessInline(admin.TabularInline):
readonly_fields = ("read_at", "starred_at")


class ThreadEventInline(admin.TabularInline):
"""Inline class for the ThreadEvent model"""

model = models.ThreadEvent
autocomplete_fields = ("author", "channel")
raw_id_fields = ("message",)
readonly_fields = ("created_at",)
extra = 0
Comment thread
coderabbitai[bot] marked this conversation as resolved.


@admin.register(models.Thread)
class ThreadAdmin(admin.ModelAdmin):
"""Admin class for the Thread model"""

inlines = [ThreadAccessInline]
inlines = [ThreadAccessInline, ThreadEventInline]
list_display = (
"id",
"subject",
Expand Down
Loading
Loading