Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Actions(models.Model):
- id = models.IntegerField(primary_key=True)
- user_id = models.IntegerField()
- status = models.CharField(max_length=60, blank=True)
- user = models.CharField(unique=True, max_length=96)
- last_update = models.IntegerField(null=True, blank=True)
- port = models.IntegerField(null=True, blank=True)
- ip = models.CharField(max_length=45, blank=True)
- mac = models.CharField(max_length=51, blank=True)
- class Meta:
- db_table = u'actions'
- class Groups(models.Model):
- id = models.IntegerField(primary_key=True)
- title = models.CharField(max_length=96, blank=True)
- radius_param = models.CharField(max_length=765, blank=True)
- class Meta:
- db_table = u'groups'
- models:
- class Users(models.Model):
- id = models.IntegerField(primary_key=True)
- gid = models.IntegerField()
- user = models.CharField(unique=True, max_length=96, blank=True)
- password = models.CharField(max_length=96, blank=True)
- blocked = models.IntegerField()
- start_d = models.DateTimeField()
- end_d = models.DateTimeField()
- hostel = models.IntegerField(null=True, blank=True)
- room = models.CharField(max_length=21, blank=True)
- class Meta:
- db_table = u'users'
- query:
- "SELECT actions.user, groups.title, users.end_d FROM actions JOIN users ON users.user = actions.user JOIN groups ON groups.id = users.gid WHERE actions.status = 'OnLine' ORDER BY users.gid"
- result:
- N Spd login end date
- 1 128Kb 9sun114bd3 2011-01-24
- 2 128Kb 3mon110381 2011-01-18
- 3 128Kb 20monb9413a 2011-01-19
- 4 256Kb 9sun111cfb 2011-02-08
- 5 256Kb 30thub9b603 2011-01-29
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement