-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
163 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# @Author: Adrien Chardon | ||
# @Date: 2014-11-05 12:04:47 | ||
# @Last Modified by: Adrien Chardon | ||
# @Last Modified time: 2014-11-05 12:08:31 | ||
|
||
# This file is part of iTeam.org. | ||
# Copyright (C) 2014 Adrien Chardon (Nodraak). | ||
# | ||
# iTeam.org is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# iTeam.org is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with iTeam.org. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
from django.contrib.syndication.views import Feed | ||
from django.utils.feedgenerator import Atom1Feed | ||
|
||
from iTeam.events.models import Event | ||
|
||
|
||
class LastEventsFeedRSS(Feed): | ||
title = "Événements" | ||
link = "/events/list/" | ||
description = "Les derniers événements de l'iTeam" | ||
|
||
def items(self): | ||
return Event.objects.order_by('-date_start')[:5] | ||
|
||
def item_title(self, item): | ||
return item.title | ||
|
||
def item_pubdate(self, item): | ||
return item.date_start | ||
|
||
def item_description(self, item): | ||
return item.text | ||
|
||
def item_author_name(self, item): | ||
return item.author | ||
|
||
def item_link(self, item): | ||
return item.get_absolute_url() | ||
|
||
|
||
class LastEventsFeedATOM(LastEventsFeedRSS): | ||
feed_type = Atom1Feed | ||
subtitle = LastEventsFeedRSS.description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# @Author: Adrien Chardon | ||
# @Date: 2014-11-05 10:54:20 | ||
# @Last Modified by: Adrien Chardon | ||
# @Last Modified time: 2014-11-05 11:06:41 | ||
|
||
# This file is part of iTeam.org. | ||
# Copyright (C) 2014 Adrien Chardon (Nodraak). | ||
# | ||
# iTeam.org is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# iTeam.org is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with iTeam.org. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
from django.contrib.syndication.views import Feed | ||
from django.utils.feedgenerator import Atom1Feed | ||
|
||
from iTeam.publications.models import Publication | ||
|
||
|
||
class LastPublicationsFeedRSS(Feed): | ||
title = "Publications" | ||
link = "/publications/" | ||
description = "Les dernières publications de l'iTeam" | ||
|
||
def items(self): | ||
return Publication.objects.order_by('-pub_date')[:5] | ||
|
||
def item_title(self, item): | ||
return item.title | ||
|
||
def item_pubdate(self, item): | ||
return item.pub_date | ||
|
||
def item_description(self, item): | ||
return item.subtitle | ||
|
||
def item_author_name(self, item): | ||
return item.author | ||
|
||
def item_link(self, item): | ||
return item.get_absolute_url() | ||
|
||
|
||
class LastPublicationsFeedATOM(LastPublicationsFeedRSS): | ||
feed_type = Atom1Feed | ||
subtitle = LastPublicationsFeedRSS.description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
User-agent: * | ||
Disallow: /admin | ||
#Sitemap: http://beta.iteam.org/sitemaps/sitemap.xml | ||
Sitemap: http://beta.iteam.org/sitemap.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters