Implement per site restriction for users

This commit is contained in:
Iacopo Spalletti 2016-05-11 17:22:12 +02:00
commit 01880591b7
No known key found for this signature in database
GPG key ID: BDCBC2EB289F60C6
11 changed files with 326 additions and 6 deletions

View file

@ -1 +1,10 @@
# -*- coding: utf-8 -*-
from django.contrib.auth.models import AbstractUser
from django.db import models
class CustomUser(AbstractUser):
sites = models.ManyToManyField('sites.Site')
def get_sites(self):
return self.sites