root / snf-astakos-app / astakos / im / management / commands / invitation-list.py @ 398a9604
History | View | Annotate | Download (2.2 kB)
1 | ca96a346 | Giorgos Verigakis | # Copyright 2012 GRNET S.A. All rights reserved.
|
---|---|---|---|
2 | df48dd1b | Giorgos Verigakis | #
|
3 | df48dd1b | Giorgos Verigakis | # Redistribution and use in source and binary forms, with or
|
4 | df48dd1b | Giorgos Verigakis | # without modification, are permitted provided that the following
|
5 | df48dd1b | Giorgos Verigakis | # conditions are met:
|
6 | df48dd1b | Giorgos Verigakis | #
|
7 | df48dd1b | Giorgos Verigakis | # 1. Redistributions of source code must retain the above
|
8 | df48dd1b | Giorgos Verigakis | # copyright notice, this list of conditions and the following
|
9 | df48dd1b | Giorgos Verigakis | # disclaimer.
|
10 | df48dd1b | Giorgos Verigakis | #
|
11 | df48dd1b | Giorgos Verigakis | # 2. Redistributions in binary form must reproduce the above
|
12 | df48dd1b | Giorgos Verigakis | # copyright notice, this list of conditions and the following
|
13 | df48dd1b | Giorgos Verigakis | # disclaimer in the documentation and/or other materials
|
14 | df48dd1b | Giorgos Verigakis | # provided with the distribution.
|
15 | df48dd1b | Giorgos Verigakis | #
|
16 | df48dd1b | Giorgos Verigakis | # THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
|
17 | df48dd1b | Giorgos Verigakis | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18 | df48dd1b | Giorgos Verigakis | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
19 | df48dd1b | Giorgos Verigakis | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
|
20 | df48dd1b | Giorgos Verigakis | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21 | df48dd1b | Giorgos Verigakis | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22 | df48dd1b | Giorgos Verigakis | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
23 | df48dd1b | Giorgos Verigakis | # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
24 | df48dd1b | Giorgos Verigakis | # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
25 | df48dd1b | Giorgos Verigakis | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
26 | df48dd1b | Giorgos Verigakis | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
27 | df48dd1b | Giorgos Verigakis | # POSSIBILITY OF SUCH DAMAGE.
|
28 | df48dd1b | Giorgos Verigakis | #
|
29 | df48dd1b | Giorgos Verigakis | # The views and conclusions contained in the software and
|
30 | df48dd1b | Giorgos Verigakis | # documentation are those of the authors and should not be
|
31 | df48dd1b | Giorgos Verigakis | # interpreted as representing official policies, either expressed
|
32 | df48dd1b | Giorgos Verigakis | # or implied, of GRNET S.A.
|
33 | df48dd1b | Giorgos Verigakis | |
34 | df48dd1b | Giorgos Verigakis | from astakos.im.models import Invitation |
35 | fc5138f0 | Sofia Papagiannaki | from synnefo.webproject.management.commands import ListCommand |
36 | df48dd1b | Giorgos Verigakis | |
37 | fc5138f0 | Sofia Papagiannaki | class Command(ListCommand): |
38 | d01e7b22 | Antony Chazapis | help = "List invitations"
|
39 | 5ce3ce4f | Sofia Papagiannaki | |
40 | fc5138f0 | Sofia Papagiannaki | object_class = Invitation |
41 | 5ce3ce4f | Sofia Papagiannaki | |
42 | fc5138f0 | Sofia Papagiannaki | FIELDS = { |
43 | fc5138f0 | Sofia Papagiannaki | "id": ("id", "The ID of the invitation"), |
44 | fc5138f0 | Sofia Papagiannaki | "inviter": ("inviter.username", "The inviter of the invitation"), |
45 | fc5138f0 | Sofia Papagiannaki | "username": ("username", "The receiver username"), |
46 | fc5138f0 | Sofia Papagiannaki | "realname": ("realname", "The receiver name"), |
47 | fc5138f0 | Sofia Papagiannaki | "code": ("code", "The code of the invitation"), |
48 | fc5138f0 | Sofia Papagiannaki | "is_consumed": ("is_consumed", "Whether the invitation is consumed or not"), |
49 | fc5138f0 | Sofia Papagiannaki | } |
50 | 5ce3ce4f | Sofia Papagiannaki | |
51 | fc5138f0 | Sofia Papagiannaki | fields = ["id", "inviter", "username", "realname", "code", "is_consumed"] |