#a link to a thumbnail that's 200px in height - Basic
#a link to a thumbnail that's 400px in height - Basic and Intermediate
#a link to the originally uploaded image - Basic, Intermediate and Premium
class Profile(models.Model):
MEMBERSHIP = (
('BASIC', 'Basic'),
('PREMIUM', 'Premium'),
('ENTERPRISE', 'Enterprise')
)
user = models.OneToOneField(User, on_delete=models.CASCADE)
membership = models.CharField(max_length=10, choices=MEMBERSHIP, default='BASIC')
def __str__(self):
return f'{self.user.username} {self.membership} Profile'
The only way I know how to do 3 build in tiers are like above.
I don't know how to do more memberships with different image sizes that can be added from admin panel. I want to have them as one model and add it as necessary to make a new user.
you could create a new model called
Membership:now you could create all the membership types you want from the admin panel