"""Users models."""

# Django
from django.db import models
from django.contrib.auth.models import User

class Profile(models.Model):
	"""
	Profile Model.

	Proxy model that extends the base data with other information.
	"""

	user = models.OneToOneField(User, on_delete=models.CASCADE)

	website = models.URLField(max_length=200, blank=True)
	biography = models.TextField(max_length=500, blank=True)
	phone_number = models.CharField(max_length=20, blank=True)

	picture = models.ImageField(upload_to='users/pictures', blank=True, null=True)

	created = models.DateTimeField(auto_now_add=True)
	modified = models.DateTimeField(auto_now=True)

	class Meta:
		verbose_name = 'Profile'
		verbose_name_plural = 'Profiles'

	def __str__(self):
		"""Return username."""

		return self.user.username

"""Users models."""

# Django
from django.db import models
from django.contrib.auth.models import User

class Profile(models.Model):
	"""
	Profile Model.

	Proxy model that extends the base data with other information.
	"""

	user = models.OneToOneField(User, on_delete=models.CASCADE)

	website = models.URLField(max_length=200, blank=True)
	biography = models.TextField(max_length=500, blank=True)
	phone_number = models.CharField(max_length=20, blank=True)

	picture = models.ImageField(upload_to='users/pictures', blank=True, null=True)

	created = models.DateTimeField(auto_now_add=True)
	modified = models.DateTimeField(auto_now=True)

	class Meta:
		verbose_name = 'Profile'
		verbose_name_plural = 'Profiles'

	def __str__(self):
		"""Return username."""

		return self.user.username

Users models. # Django Profile Model.  	Proxy model that extends the base data with other information. Return username.