The Higher Education and Research forge

Home My Page Projects Code Snippets Project Openings agenda_emath
Summary Activity Forums Tracker Tasks Docs News SCM Files Dokuwiki Continious Integration Listes Sympa

[#9905] ajouter la possibilité de désactiver un événement

Date:
2015-06-18 08:40
Priority:
5
State:
Open
Submitted by:
sim chevan (schevanc)
Assigned to:
sim chevan (schevanc)
Product:
none
Operating System:
none
Component:
none
Summary:
ajouter la possibilité de désactiver un événement

Detailed description
voir pour avertir le responsable du calendrier que un évent a été modifié
Message  ↓
Date: 2016-07-11 11:53
Sender: sim chevan

si on averti le responsable du calendrier, il faut demander à celui qui dévalide les événements un message qui sera envoyé au responsable

Date: 2015-07-09 07:41
Sender: sim chevan

il faudrait avertir le responsable du séminaire de /des désactivation(s)

Date: 2015-07-02 14:44
Sender: sim chevan

faire un test ;)
voir si l'action est là...

Date: 2015-07-02 14:41
Sender: sim chevan

donc ajout de 2 actions ds admin.py ds :
donc c'est miraculeux : néanmoins il reste à avertir le proprio du séminaire
(simili code :
for obj in queryset:
mailContent += obj.Id + obj.Title
end
mail SeminarOwner : subject (Un)Published content
+ mailContent
)




-----
class EventAdmin(admin.ModelAdmin):
list_display = ['dtstart', 'summary', 'dtend', 'published', 'organizer', 'location', 'dtstamp', 'uid', 'created_on']
search_fields = ['summary', 'organizer']


actions = ['make_published','make_unpublished']


def make_published(self, request, queryset):
rows_updated = queryset.update(published=True)
if rows_updated == 1:
message_bit = "1 event was"
else:
message_bit = "%s events were" % rows_updated
self.message_user(request, "%s successfully marked as published." % message_bit)
make_published.short_description = "Mark selected events as published"

def make_unpublished(self, request, queryset):
rows_updated = queryset.update(published=False)
if rows_updated == 1:
message_bit = "1 event was"
else:
message_bit = "%s events were" % rows_updated
self.message_user(request, "%s successfully marked as unpublished." % message_bit)
make_unpublished.short_description = "Mark selected events as unpublished"

No related tasks

No attached documents

Field Old Value Date By
priority32016-05-10 14:15
assigned_tonone2015-07-02 14:43