Browse Source

agent prompt ordering options added

master
Mohsen Taba 2 weeks ago
parent
commit
f5c4371f73
  1. 17
      apps/agent/migrations/0005_alter_agentprompt_options.py
  2. 3
      apps/agent/models.py
  3. 17
      apps/course/migrations/0017_alter_coursecategory_options.py

17
apps/agent/migrations/0005_alter_agentprompt_options.py

@ -0,0 +1,17 @@
# Generated by Django 5.2.12 on 2026-07-04 14:39
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('agent', '0004_embeddingsession'),
]
operations = [
migrations.AlterModelOptions(
name='agentprompt',
options={'ordering': ['id']},
),
]

3
apps/agent/models.py

@ -36,6 +36,9 @@ class AgentPrompt(models.Model):
content = models.TextField(help_text="The instruction text.") content = models.TextField(help_text="The instruction text.")
is_active = models.BooleanField(default=True) is_active = models.BooleanField(default=True)
class Meta:
ordering = ["id"]
def __str__(self): def __str__(self):
# Display the first 50 chars as the name in admin # Display the first 50 chars as the name in admin
# if self.is_active: # if self.is_active:

17
apps/course/migrations/0017_alter_coursecategory_options.py

@ -0,0 +1,17 @@
# Generated by Django 5.2.12 on 2026-07-04 14:39
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('course', '0016_remove_course_professor_course_professors'),
]
operations = [
migrations.AlterModelOptions(
name='coursecategory',
options={'ordering': ('-id',)},
),
]
Loading…
Cancel
Save