multi user django rest framework

Solutions on MaxInterview for multi user django rest framework by the best coders in the world

showing results for - "multi user django rest framework"
Nicola
06 Oct 2017
1class User(AbstractUser):
2    is_phamacy = models.BooleanField(default=False)
3    is_restaurant = models.BooleanField(default=False)
4    is_grocery_shop = models.BooleanField(default=False)
5    is_rider = models.BooleanField(default=False)
6
7class Restaurant(models.Model):
8    restaurant_user = models.OneToOneField(
9      settings.AUTH_USER_MODEL, on_delete=models.CASCADE, blank=True, null=True)
10    restaurant_name = models.CharField(max_length=255,blank=True)
11    full_name_of_merchant = models.CharField(max_length=255,blank=True)
12    government_id = models.ImageField(upload_to = 'media/government_id' , null = True, blank=True) 
13    images_of_restaurants = models.ImageField(upload_to = 'media/images_of_restaurants' , null = True, blank=True) 
14    position_in_restaurant = models.CharField(max_length=255,blank=True)
15    is_your_business_registered = models.BooleanField(default=True)
16    tin_number = models.CharField(max_length=255,blank=True)
17    longitude = models.FloatField(default=0000)
18    latitude = models.FloatField(default=0000)
19    long_you_have_been_working = models.IntegerField()
20    want_delivery_guy = models.BooleanField(default=True)
21    is_verified = models.BooleanField(default=False)
22    is_active = models.BooleanField(default=True)
23    is_staff = models.BooleanField(default=False)
24    created_at = models.DateTimeField(auto_now_add=True)
25    updated_at = models.DateTimeField(auto_now=True)
26