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


class Subreddit(models.Model):
    title = models.CharField(
        max_length=50,
        blank=False,
        null=False,
    )
    about = models.CharField(
        max_length=100,
        blank=False,
        null=False
    )
    created_at = models.DateTimeField(
        default=timezone.now,
        auto_now_add=False
    )
    members = models.ManyToManyField(RedditUser)
    def __str__(self):
        return self.title
    
7db5e09bfde2018ca7471d3324b6eddf599aad06
<mask token>


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

<mask token>


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

    def __str__(self):
        return self.title

<mask token>


class Subreddit(models.Model):
    title = models.CharField(max_length=50, blank=False, null=False)
    about = models.CharField(max_length=100, blank=False, null=False)
    created_at = models.DateTimeField(default=timezone.now, auto_now_add=False)
    members = models.ManyToManyField(RedditUser)

    def __str__(self):
        return self.title

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


class Subreddit(models.Model):
    title = models.CharField(max_length=50, blank=False, null=False)
    about = models.CharField(max_length=100, blank=False, null=False)
    created_at = models.DateTimeField(default=timezone.now, auto_now_add=False)
    members = models.ManyToManyField(RedditUser)

    def __str__(self):
        return self.title

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


class Subreddit(models.Model):
    title = models.CharField(
        max_length=50,
        blank=False,
        null=False,
    )
    about = models.CharField(
        max_length=100,
        blank=False,
        null=False
    )
    created_at = models.DateTimeField(
        default=timezone.now,
        auto_now_add=False
    )
    members = models.ManyToManyField(RedditUser)
    def __str__(self):
        return self.title
    