# Path: twobuntu/news/models.py
# class Item(models.Model):
#     """
#     A short news report.
#     """
# 
#     reporter = models.ForeignKey(
#         User,
#         help_text="The user reporting the news item.",
#     )
#     title = models.CharField(
#         max_length=100,
#         help_text="The title of the news item.",
#     )
#     body = models.TextField(
#         help_text="The body of the news item [in Markdown].",
#     )
#     url = models.URLField(help_text="URL with more details about the news item.")
#     date = models.DateTimeField(auto_now_add=True)
# 
#     def __str__(self):
#         return self.title
# 
#     class Meta:
#         ordering = ('-date',)


from django import forms
from twobuntu.news.models import Item



class AddItemForm(forms.ModelForm):
    """
    Form for adding news items.
    """

    class Meta:

# Path: twobuntu/news/models.py
# class Item(models.Model):
#     """
#     A short news report.
#     """
# 
#     reporter = models.ForeignKey(
#         User,
#         help_text="The user reporting the news item.",
#     )
#     title = models.CharField(
#         max_length=100,
#         help_text="The title of the news item.",
#     )
#     body = models.TextField(
#         help_text="The body of the news item [in Markdown].",
#     )
#     url = models.URLField(help_text="URL with more details about the news item.")
#     date = models.DateTimeField(auto_now_add=True)
# 
#     def __str__(self):
#         return self.title
# 
#     class Meta:
#         ordering = ('-date',)


# Path: twobuntu/news/forms.py
from django import forms
from twobuntu.news.models import Item




class AddItemForm(forms.ModelForm):
    """
    Form for adding news items.
    """

    class Meta:

        model = Item