FossilRepo

Remove chat feature (not ready), fix urls

lmata 2026-04-07 04:53 trunk
Commit 8a9a0c95c0e55f5dd7aee6f7d1f3341da0cd07ec83d25f47d65372d7af02e7e1
D fossil/chat.py
-22
--- a/fossil/chat.py
+++ b/fossil/chat.py
@@ -1,22 +0,0 @@
1
-"""Per-project chat backed by Django models.
2
-
3
-Simple real-time-ish chat using HTMX polling. Messages stored in PostgreSQL.
4
-"""
5
-
6
-from django.contrib.auth.models import User
7
-from django.db import models
8
-
9
-
10
-class ChatMessage(models.Model):
11
- """A chat message in a project chatroom."""
12
-
13
- project = models.ForeignKey("projects.Project", on_delete=models.CASCADE, related_name="chat_messages")
14
- user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="chat_messages")
15
- message = models.TextField()
16
- created_at = models.DateTimeField(auto_now_add=True)
17
-
18
- class Meta:
19
- ordering = ["created_at"]
20
-
21
- def __str__(self):
22
- return f"{self.user.username}: {self.message[:50]}"
--- a/fossil/chat.py
+++ b/fossil/chat.py
@@ -1,22 +0,0 @@
1 """Per-project chat backed by Django models.
2
3 Simple real-time-ish chat using HTMX polling. Messages stored in PostgreSQL.
4 """
5
6 from django.contrib.auth.models import User
7 from django.db import models
8
9
10 class ChatMessage(models.Model):
11 """A chat message in a project chatroom."""
12
13 project = models.ForeignKey("projects.Project", on_delete=models.CASCADE, related_name="chat_messages")
14 user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="chat_messages")
15 message = models.TextField()
16 created_at = models.DateTimeField(auto_now_add=True)
17
18 class Meta:
19 ordering = ["created_at"]
20
21 def __str__(self):
22 return f"{self.user.username}: {self.message[:50]}"
--- a/fossil/chat.py
+++ b/fossil/chat.py
@@ -1,22 +0,0 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- fossil/models.py
+++ fossil/models.py
@@ -65,8 +65,7 @@
6565
def __str__(self):
6666
return f"{self.repository.filename} @ {self.created_at:%Y-%m-%d %H:%M}" if self.created_at else self.repository.filename
6767
6868
6969
# Import related models so they're discoverable by Django
70
-from fossil.chat import ChatMessage # noqa: E402, F401
7170
from fossil.notifications import Notification, ProjectWatch # noqa: E402, F401
7271
from fossil.sync_models import GitMirror, SSHKey, SyncLog # noqa: E402, F401
7372
--- fossil/models.py
+++ fossil/models.py
@@ -65,8 +65,7 @@
65 def __str__(self):
66 return f"{self.repository.filename} @ {self.created_at:%Y-%m-%d %H:%M}" if self.created_at else self.repository.filename
67
68
69 # Import related models so they're discoverable by Django
70 from fossil.chat import ChatMessage # noqa: E402, F401
71 from fossil.notifications import Notification, ProjectWatch # noqa: E402, F401
72 from fossil.sync_models import GitMirror, SSHKey, SyncLog # noqa: E402, F401
73
--- fossil/models.py
+++ fossil/models.py
@@ -65,8 +65,7 @@
65 def __str__(self):
66 return f"{self.repository.filename} @ {self.created_at:%Y-%m-%d %H:%M}" if self.created_at else self.repository.filename
67
68
69 # Import related models so they're discoverable by Django
 
70 from fossil.notifications import Notification, ProjectWatch # noqa: E402, F401
71 from fossil.sync_models import GitMirror, SSHKey, SyncLog # noqa: E402, F401
72
--- fossil/urls.py
+++ fossil/urls.py
@@ -37,13 +37,10 @@
3737
path("sync/git/callback/gitlab/", views.oauth_gitlab_callback, name="oauth_gitlab_callback"),
3838
path("code/raw/<path:filepath>", views.code_raw, name="code_raw"),
3939
path("code/blame/<path:filepath>", views.code_blame, name="code_blame"),
4040
path("code/history/<path:filepath>", views.file_history, name="file_history"),
4141
path("watch/", views.toggle_watch, name="toggle_watch"),
42
- path("chat/", views.chat_room, name="chat"),
43
- path("chat/messages/", views.chat_messages, name="chat_messages"),
44
- path("chat/send/", views.chat_send, name="chat_send"),
4542
path("timeline/rss/", views.timeline_rss, name="timeline_rss"),
4643
path("tickets/export/", views.tickets_csv, name="tickets_csv"),
4744
path("docs/", views.fossil_docs, name="docs"),
4845
path("docs/<path:doc_path>", views.fossil_doc_page, name="doc_page"),
4946
]
5047
--- fossil/urls.py
+++ fossil/urls.py
@@ -37,13 +37,10 @@
37 path("sync/git/callback/gitlab/", views.oauth_gitlab_callback, name="oauth_gitlab_callback"),
38 path("code/raw/<path:filepath>", views.code_raw, name="code_raw"),
39 path("code/blame/<path:filepath>", views.code_blame, name="code_blame"),
40 path("code/history/<path:filepath>", views.file_history, name="file_history"),
41 path("watch/", views.toggle_watch, name="toggle_watch"),
42 path("chat/", views.chat_room, name="chat"),
43 path("chat/messages/", views.chat_messages, name="chat_messages"),
44 path("chat/send/", views.chat_send, name="chat_send"),
45 path("timeline/rss/", views.timeline_rss, name="timeline_rss"),
46 path("tickets/export/", views.tickets_csv, name="tickets_csv"),
47 path("docs/", views.fossil_docs, name="docs"),
48 path("docs/<path:doc_path>", views.fossil_doc_page, name="doc_page"),
49 ]
50
--- fossil/urls.py
+++ fossil/urls.py
@@ -37,13 +37,10 @@
37 path("sync/git/callback/gitlab/", views.oauth_gitlab_callback, name="oauth_gitlab_callback"),
38 path("code/raw/<path:filepath>", views.code_raw, name="code_raw"),
39 path("code/blame/<path:filepath>", views.code_blame, name="code_blame"),
40 path("code/history/<path:filepath>", views.file_history, name="file_history"),
41 path("watch/", views.toggle_watch, name="toggle_watch"),
 
 
 
42 path("timeline/rss/", views.timeline_rss, name="timeline_rss"),
43 path("tickets/export/", views.tickets_csv, name="tickets_csv"),
44 path("docs/", views.fossil_docs, name="docs"),
45 path("docs/<path:doc_path>", views.fossil_doc_page, name="doc_page"),
46 ]
47

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button