diff gpp/news/forms.py @ 493:bdcce55f137e

For #235, some minor news tweaks. The submitted by text is now a link to the author's profile. Only show 1 textarea to the user when submitting a new news story. The admin can paste into the 2nd one if needed.
author Brian Neal <bgneal@gmail.com>
date Sat, 22 Oct 2011 00:48:45 +0000
parents 88b2b9cb8c1f
children
line wrap: on
line diff
--- a/gpp/news/forms.py	Sat Oct 22 00:07:50 2011 +0000
+++ b/gpp/news/forms.py	Sat Oct 22 00:48:45 2011 +0000
@@ -1,7 +1,7 @@
 """
 Forms for the news application.
+
 """
-
 from django import forms
 from django.conf import settings
 
@@ -12,12 +12,14 @@
 class AddNewsForm(forms.ModelForm):
    """Form for a user to submit a news story to the admins for review."""
    title = forms.CharField(widget=forms.TextInput(attrs={'size': 52}))
-   short_text = forms.CharField(widget=forms.Textarea(attrs={'rows': 20, 'cols': 80}))
-   long_text = forms.CharField(required=False, widget=forms.Textarea(attrs={'rows': 20, 'cols': 80}))
+   short_text = forms.CharField(
+           label="Article text",
+           widget=forms.Textarea(
+               attrs={'rows': 60, 'cols': 80, 'style': 'height:500px'}))
 
    class Meta:
       model = PendingStory
-      fields = ('title', 'category', 'short_text', 'long_text')
+      fields = ['title', 'category', 'short_text']
 
    class Media:
       js = settings.GPP_THIRD_PARTY_JS['tiny_mce']