from django.db import models
from django.conf import settings
# Create your models here.
from .validators import validate_content



class Tweet(models.Model):
	user = models.ForeignKey(settings.AUTH_USER_MODEL)
	content = models.CharField(max_length=140, validators=[validate_content])
	updated = models.DateTimeField(auto_now=True)
	timestamp = models.DateTimeField(auto_now_add=True)

	def __str__(self):
		return str(self.content)

	# def clean(self,*args,**kwargs):
	# 	content = self.content
	# 	if content == 'abc':
	# 		raise ValidationError('Cannot be abc')
	# 	return super(Tweet,self).clean(*args,**kwargs)

bf4e8acbac949f28a1298b10473f90c33bdc7e86
<mask token>


class Tweet(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Tweet(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        return str(self.content)

<mask token>


class Tweet(models.Model):
    user = models.ForeignKey(settings.AUTH_USER_MODEL)
    content = models.CharField(max_length=140, validators=[validate_content])
    updated = models.DateTimeField(auto_now=True)
    timestamp = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return str(self.content)

from django.db import models
from django.conf import settings
from .validators import validate_content


class Tweet(models.Model):
    user = models.ForeignKey(settings.AUTH_USER_MODEL)
    content = models.CharField(max_length=140, validators=[validate_content])
    updated = models.DateTimeField(auto_now=True)
    timestamp = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return str(self.content)

from django.db import models
from django.conf import settings
# Create your models here.
from .validators import validate_content



class Tweet(models.Model):
	user = models.ForeignKey(settings.AUTH_USER_MODEL)
	content = models.CharField(max_length=140, validators=[validate_content])
	updated = models.DateTimeField(auto_now=True)
	timestamp = models.DateTimeField(auto_now_add=True)

	def __str__(self):
		return str(self.content)

	# def clean(self,*args,**kwargs):
	# 	content = self.content
	# 	if content == 'abc':
	# 		raise ValidationError('Cannot be abc')
	# 	return super(Tweet,self).clean(*args,**kwargs)
