Compare commits

..

15 commits
docs ... main

Author SHA1 Message Date
Hugh Rundle cda4b61b4b Merge pull request 'Reference parent conference in CFP section of weekly email' (#20) from admin into main
Reviewed-on: #20
2024-11-09 10:02:07 +11:00
Hugh Rundle 56094b9e7e Merge branch 'main' into admin 2024-11-09 10:01:40 +11:00
Hugh Rundle 507d6d3508
close p tag properly 2024-11-09 09:59:57 +11:00
Hugh Rundle 5ce0a679fb
Add event detail to call for papers in weekly email
fixes #18
2024-11-09 09:58:40 +11:00
Hugh Rundle e814c9f981 Merge pull request 'add search in admin models' (#19) from admin into main
Reviewed-on: #19
2024-11-09 09:52:56 +11:00
Hugh Rundle da58002f2f
clean up readme 2024-11-09 09:51:49 +11:00
Hugh Rundle 60451f565a
Merge branch 'main' into admin 2024-11-09 09:50:18 +11:00
Hugh Rundle 2e0bcb1c01
Merge branch 'main' of git.suboptimal.solutions:hugh/ausglamr 2024-11-09 09:49:53 +11:00
Hugh Rundle 16561eba6f
add search to admin screens 2024-11-09 09:44:36 +11:00
Hugh Rundle 9a355ff2a0 Merge pull request 'Bump django from 4.2.11 to 4.2.14' (#16) from dependabot/pip/django-4.2.14 into main
Reviewed-on: #16
2024-07-30 20:28:34 +10:00
Hugh Rundle 1864761a47 Merge branch 'main' into dependabot/pip/django-4.2.14 2024-07-30 20:28:03 +10:00
Hugh Rundle cd42612596 Merge pull request 'update docs and glamr-dev' (#17) from docs into main
Reviewed-on: #17
2024-07-30 20:27:15 +10:00
Hugh Rundle c8fc3b4c45
Merge pull request #17 from hughrun/hughrun-patch-2
Update README.md to point to new repo
2024-07-29 20:08:49 +10:00
Hugh Rundle e8bebca7b4
Update README.md to point to new repo 2024-07-29 20:08:30 +10:00
dependabot[bot] d57c44cc85
Bump django from 4.2.11 to 4.2.14
Bumps [django](https://github.com/django/django) from 4.2.11 to 4.2.14.
- [Commits](https://github.com/django/django/compare/4.2.11...4.2.14)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-10 22:08:59 +00:00
4 changed files with 12 additions and 5 deletions

View file

@ -116,7 +116,7 @@ BACKUPS_DIR=/home/ausglamr/backups
1,23,47 * * * * cd /home/ausglamr/ausglamr && /home/ausglamr/ausglamr/glamr-dev announce 1,23,47 * * * * cd /home/ausglamr/ausglamr && /home/ausglamr/ausglamr/glamr-dev announce
# Check feeds hourly on the eleventh minute # Check feeds hourly on the eleventh minute
11 * * * * cd /home/ausglamr/ausglamr && /home/ausglamr/ausglamr/glamr-dev check_feeds 11 * * * * cd /home/ausglamr/ausglamr && /home/ausglamr/ausglamr/glamr-dev check_feeds
# Queue event announcements daily at 4:01am # Queue event announcements daily at 4:01am
1 4 * * * cd /home/ausglamr/ausglamr && /home/ausglamr/ausglamr/glamr-dev queue_announcements 1 4 * * * cd /home/ausglamr/ausglamr && /home/ausglamr/ausglamr/glamr-dev queue_announcements

View file

@ -131,6 +131,7 @@ class Blog(admin.ModelAdmin):
"active", "active",
) )
ordering = ["approved", "-suspended", "-failing"] ordering = ["approved", "-suspended", "-failing"]
search_fields = ["title", "author_name", "url"]
actions = [approve, unapprove, suspend, unsuspend, activate, disable] actions = [approve, unapprove, suspend, unsuspend, activate, disable]
@ -140,6 +141,7 @@ class Article(admin.ModelAdmin):
date_hierarchy = "pubdate" date_hierarchy = "pubdate"
list_display = ("title", "blog_title", "pubdate") list_display = ("title", "blog_title", "pubdate")
search_fields = ["title", "author_name", "blog_title", "url"]
def blog_title(self, obj): # pylint: disable=no-self-use def blog_title(self, obj): # pylint: disable=no-self-use
"""get the title of the parent blog""" """get the title of the parent blog"""
@ -151,7 +153,7 @@ class Tag(admin.ModelAdmin):
"""display settings for tags""" """display settings for tags"""
list_display = ("name",) list_display = ("name",)
search_fields = ["name"]
@admin.register(models.Event) @admin.register(models.Event)
class Event(admin.ModelAdmin): class Event(admin.ModelAdmin):
@ -166,6 +168,7 @@ class Event(admin.ModelAdmin):
"start_date", "start_date",
) )
ordering = ["approved", "announcements"] ordering = ["approved", "announcements"]
search_fields = ["name", "description", "url"]
actions = [approve, unapprove] actions = [approve, unapprove]
@ -176,6 +179,7 @@ class CallForPapers(admin.ModelAdmin):
list_display = ("name", "event", "approved", "closing_date") list_display = ("name", "event", "approved", "closing_date")
list_select_related = ("event",) list_select_related = ("event",)
ordering = ["approved", "closing_date"] ordering = ["approved", "closing_date"]
search_fields = ["event__name", "event__url", "details"]
actions = [approve, unapprove] actions = [approve, unapprove]
@ -185,6 +189,7 @@ class Group(admin.ModelAdmin):
list_display = ("name", "approved", "category", "description") list_display = ("name", "approved", "category", "description")
ordering = ["approved", "name"] ordering = ["approved", "name"]
search_fields = ["name", "description", "url"]
actions = [approve, unapprove] actions = [approve, unapprove]
@ -200,6 +205,7 @@ class Newsletter(admin.ModelAdmin):
"active", "active",
) )
ordering = ["approved", "-failing"] ordering = ["approved", "-failing"]
search_fields = ["name", "description", "url", "author_name"]
actions = [approve, unapprove, suspend, activate, disable] actions = [approve, unapprove, suspend, activate, disable]
@ -209,6 +215,7 @@ class Edition(admin.ModelAdmin):
date_hierarchy = "pubdate" date_hierarchy = "pubdate"
list_display = ("title", "newsletter_name", "pubdate") list_display = ("title", "newsletter_name", "pubdate")
search_fields = ["title", "description", "url", "newsletter__name", "author_name"]
def newsletter_name(self, obj): # pylint: disable=no-self-use def newsletter_name(self, obj): # pylint: disable=no-self-use
"""get the title of the parent newsletter""" """get the title of the parent newsletter"""

View file

@ -133,11 +133,11 @@ class Command(BaseCommand):
for instance in cfps: for instance in cfps:
c_date = instance.closing_date c_date = instance.closing_date
title_string = ( title_string = (
f"<h4><a href='{instance.event.url}'>{instance.name}</a></h4>" f"<h4><a href='{instance.event.url}'>{instance.event.name} - {instance.name}</a></h4>"
) )
dates_string = f"<p><strong>Closes:</strong><em>{c_date:%a} {c_date.day} {c_date:%B}</em></p>" dates_string = f"<p><strong>Closes:</strong><em>{c_date:%a} {c_date.day} {c_date:%B}</em></p>"
description_string = ( description_string = (
f"<p style='margin-bottom:24px;'>{instance.details}</p>" f"<p>{instance.details}</p><p style='margin-bottom:24px;'>{instance.event.description}</p>"
) )
string_list = [title_string, dates_string, description_string] string_list = [title_string, dates_string, description_string]

View file

@ -1,6 +1,6 @@
beautifulsoup4==4.12.2 beautifulsoup4==4.12.2
gunicorn==22.0.0 gunicorn==22.0.0
Django==4.2.11 Django==4.2.14
environs==9.5.0 environs==9.5.0
feedparser==6.0.10 feedparser==6.0.10
psycopg2==2.9.5 psycopg2==2.9.5