Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

from django.contrib.gis.db import models 

from django.contrib.auth.models import User, Group 

 

class GroupRequest(models.Model): 

    """ 

    store user's requests for group membership 

    """ 

    user = models.ForeignKey(User) 

    group = models.ForeignKey(Group) 

    date_requested = models.DateTimeField(auto_now_add=True, verbose_name="Date Requested") 

    notes = models.TextField(blank=True) 

 

    def __unicode__(self): 

        return "%s requests membership with %s" % (self.user.username, self.group.name)