SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 3b312c82 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Add Django job openings RSS feed

parent e64e691e
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ from django.utils.feedgenerator import Atom1Feed
from django.urls import reverse
from django.db.models import Q
from careers.models import JobOpening
from comments.models import Comment
from commentaries.models import Commentary
from journals.models import Publication
......@@ -179,3 +180,22 @@ class LatestPublicationsFeedAtom(LatestPublicationsFeedRSS):
return datetime.datetime(item.publication_date.year,
item.publication_date.month,
item.publication_date.day)
class DjangoJobOpeningsFeedRSS(Feed):
title = 'SciPost: Dev Jobs'
link = '/careers/django/'
description = "SciPost: Django dev job openings"
def items(self):
return JobOpening.objects.publicly_visible().filter(
description__icontains='django')
def item_title(self, item):
return item.title
def item_description(self, item):
return item.short_description
def item_link(self, item):
return item.get_absolute_url()
......@@ -9,9 +9,12 @@ from django.views.generic.base import RedirectView
from django.urls import include, path, re_path
from . import views, sso
from .feeds import LatestNewsFeedRSS, LatestNewsFeedAtom, LatestCommentsFeedRSS,\
LatestCommentsFeedAtom, LatestSubmissionsFeedRSS, LatestSubmissionsFeedAtom,\
LatestPublicationsFeedRSS, LatestPublicationsFeedAtom
from .feeds import (
LatestNewsFeedRSS, LatestNewsFeedAtom, LatestCommentsFeedRSS,
LatestCommentsFeedAtom, LatestSubmissionsFeedRSS, LatestSubmissionsFeedAtom,
LatestPublicationsFeedRSS, LatestPublicationsFeedAtom,
DjangoJobOpeningsFeedRSS,
)
from journals import views as journals_views
from journals.regexes import ISSUE_DOI_LABEL_REGEX,\
......@@ -300,6 +303,11 @@ urlpatterns = [
LatestPublicationsFeedAtom(),
name='feeds_atom_publications'
),
path(
'rss/careers/django/',
DjangoJobOpeningsFeedRSS(),
name='feeds_django_job_openings'
),
path(
'atom/publications/<specialty:specialty>',
LatestPublicationsFeedAtom(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment