from django.db import models
from django.utils import timezone

class User(models.Model):
	name = models.CharField('Имя', max_length = 50)
	password = models.CharField('Пароль', max_length = 100)
	date_reg = models.DateTimeField('Дата публикации')

	def __str__(self):
		return self.name

	def day_in_project(self):
		return timezone.now() - self.date_reg

	class Meta:
		verbose_name = 'Пользователь'
		verbose_name_plural = 'Пользователи'