2017-10-22 18:04:59 -04:00
|
|
|
from django.db import models
|
|
|
|
from django.contrib.auth.models import AbstractUser
|
|
|
|
|
|
|
|
|
2017-10-22 20:53:51 -04:00
|
|
|
def avatar_path(instance, name):
|
|
|
|
return 'avatars/{id}/{name}'.format(id=instance.id, name=name)
|
|
|
|
|
|
|
|
|
2017-10-22 18:04:59 -04:00
|
|
|
class User(AbstractUser):
|
2017-10-22 20:53:51 -04:00
|
|
|
avatar = models.ImageField(upload_to=avatar_path)
|
2017-10-22 18:04:59 -04:00
|
|
|
note = models.TextField(blank=True)
|