from suggest.models import Suggestion
class SuggestionAdmin(admin.ModelAdmin):
- list_display = ('title', 'user', 'author', 'email', 'created_at')
+ list_display = ('created_at', 'contact', 'user', 'description')
admin.site.register(Suggestion, SuggestionAdmin)
from django.utils.translation import ugettext_lazy as _
class SuggestForm(forms.Form):
- author = forms.CharField(label=_('Author'), max_length=50, required=False)
- email = forms.EmailField(label=_('E-mail'), required=False)
- title = forms.CharField(label=_('Title'), max_length=120, required=True)
+ contact = forms.CharField(label=_('Contact'), max_length=120, required=False)
description = forms.CharField(label=_('Description'), widget=forms.Textarea, required=True)
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-06-01 11:35+0200\n"
+"POT-Creation-Date: 2010-06-02 10:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:9
-msgid "Author"
+msgid "Contact"
msgstr ""
#: forms.py:10
-msgid "E-mail"
-msgstr ""
-
-#: forms.py:11
-msgid "Title"
-msgstr ""
-
-#: forms.py:12
msgid "Description"
msgstr ""
#: models.py:10
-msgid "author"
+msgid "contact"
msgstr ""
#: models.py:11
-msgid "e-mail"
-msgstr ""
-
-#: models.py:12
-msgid "title"
-msgstr ""
-
-#: models.py:13
msgid "description"
msgstr ""
-#: models.py:14
+#: models.py:12
msgid "creation date"
msgstr ""
-#: models.py:15
+#: models.py:13
msgid "IP address"
msgstr ""
-#: models.py:20
+#: models.py:18
msgid "suggestion"
msgstr ""
-#: models.py:21
+#: models.py:19
msgid "suggestions"
msgstr ""
-#: views.py:33
+#: views.py:31
msgid "Report was sent successfully."
msgstr ""
msgid "Report a bug or suggestion"
msgstr ""
-#: templates/suggest.html:9
+#: templates/suggest.html:7
msgid "Send report"
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-06-01 11:35+0200\n"
+"POT-Creation-Date: 2010-06-02 10:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:9
-msgid "Author"
+msgid "Contact"
msgstr ""
#: forms.py:10
-msgid "E-mail"
-msgstr ""
-
-#: forms.py:11
-msgid "Title"
-msgstr ""
-
-#: forms.py:12
msgid "Description"
msgstr ""
#: models.py:10
-msgid "author"
+msgid "contact"
msgstr ""
#: models.py:11
-msgid "e-mail"
-msgstr ""
-
-#: models.py:12
-msgid "title"
-msgstr ""
-
-#: models.py:13
msgid "description"
msgstr ""
-#: models.py:14
+#: models.py:12
msgid "creation date"
msgstr ""
-#: models.py:15
+#: models.py:13
msgid "IP address"
msgstr ""
-#: models.py:20
+#: models.py:18
msgid "suggestion"
msgstr ""
-#: models.py:21
+#: models.py:19
msgid "suggestions"
msgstr ""
-#: views.py:33
+#: views.py:31
msgid "Report was sent successfully."
msgstr ""
msgid "Report a bug or suggestion"
msgstr ""
-#: templates/suggest.html:9
+#: templates/suggest.html:7
msgid "Send report"
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-06-01 11:35+0200\n"
+"POT-Creation-Date: 2010-06-02 10:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:9
-msgid "Author"
+msgid "Contact"
msgstr ""
#: forms.py:10
-msgid "E-mail"
-msgstr ""
-
-#: forms.py:11
-msgid "Title"
-msgstr ""
-
-#: forms.py:12
msgid "Description"
msgstr ""
#: models.py:10
-msgid "author"
+msgid "contact"
msgstr ""
#: models.py:11
-msgid "e-mail"
-msgstr ""
-
-#: models.py:12
-msgid "title"
-msgstr ""
-
-#: models.py:13
msgid "description"
msgstr ""
-#: models.py:14
+#: models.py:12
msgid "creation date"
msgstr ""
-#: models.py:15
+#: models.py:13
msgid "IP address"
msgstr ""
-#: models.py:20
+#: models.py:18
msgid "suggestion"
msgstr ""
-#: models.py:21
+#: models.py:19
msgid "suggestions"
msgstr ""
-#: views.py:33
+#: views.py:31
msgid "Report was sent successfully."
msgstr ""
msgid "Report a bug or suggestion"
msgstr ""
-#: templates/suggest.html:9
+#: templates/suggest.html:7
msgid "Send report"
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-06-01 11:35+0200\n"
+"POT-Creation-Date: 2010-06-02 10:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:9
-msgid "Author"
+msgid "Contact"
msgstr ""
#: forms.py:10
-msgid "E-mail"
-msgstr ""
-
-#: forms.py:11
-msgid "Title"
-msgstr ""
-
-#: forms.py:12
msgid "Description"
msgstr ""
#: models.py:10
-msgid "author"
+msgid "contact"
msgstr ""
#: models.py:11
-msgid "e-mail"
-msgstr ""
-
-#: models.py:12
-msgid "title"
-msgstr ""
-
-#: models.py:13
msgid "description"
msgstr ""
-#: models.py:14
+#: models.py:12
msgid "creation date"
msgstr ""
-#: models.py:15
+#: models.py:13
msgid "IP address"
msgstr ""
-#: models.py:20
+#: models.py:18
msgid "suggestion"
msgstr ""
-#: models.py:21
+#: models.py:19
msgid "suggestions"
msgstr ""
-#: views.py:33
+#: views.py:31
msgid "Report was sent successfully."
msgstr ""
msgid "Report a bug or suggestion"
msgstr ""
-#: templates/suggest.html:9
+#: templates/suggest.html:7
msgid "Send report"
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-06-01 11:35+0200\n"
+"POT-Creation-Date: 2010-06-02 10:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:9
-msgid "Author"
+msgid "Contact"
msgstr ""
#: forms.py:10
-msgid "E-mail"
-msgstr ""
-
-#: forms.py:11
-msgid "Title"
-msgstr ""
-
-#: forms.py:12
msgid "Description"
msgstr ""
#: models.py:10
-msgid "author"
+msgid "contact"
msgstr ""
#: models.py:11
-msgid "e-mail"
-msgstr ""
-
-#: models.py:12
-msgid "title"
-msgstr ""
-
-#: models.py:13
msgid "description"
msgstr ""
-#: models.py:14
+#: models.py:12
msgid "creation date"
msgstr ""
-#: models.py:15
+#: models.py:13
msgid "IP address"
msgstr ""
-#: models.py:20
+#: models.py:18
msgid "suggestion"
msgstr ""
-#: models.py:21
+#: models.py:19
msgid "suggestions"
msgstr ""
-#: views.py:33
+#: views.py:31
msgid "Report was sent successfully."
msgstr ""
msgid "Report a bug or suggestion"
msgstr ""
-#: templates/suggest.html:9
+#: templates/suggest.html:7
msgid "Send report"
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-06-01 11:35+0200\n"
-"PO-Revision-Date: 2010-06-01 11:37\n"
+"POT-Creation-Date: 2010-06-02 10:44+0200\n"
+"PO-Revision-Date: 2010-06-02 10:45\n"
"Last-Translator: <radek.czajka@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"X-Translated-Using: django-rosetta 0.5.3\n"
#: forms.py:9
-msgid "Author"
-msgstr "Autor"
+msgid "Contact"
+msgstr "Kontakt"
#: forms.py:10
-msgid "E-mail"
-msgstr "E-mail"
-
-#: forms.py:11
-msgid "Title"
-msgstr "Tytuł"
-
-#: forms.py:12
msgid "Description"
msgstr "Opis"
#: models.py:10
-msgid "author"
-msgstr "autor"
+msgid "contact"
+msgstr "kontakt"
#: models.py:11
-msgid "e-mail"
-msgstr "e-mail"
-
-#: models.py:12
-msgid "title"
-msgstr "tytuł"
-
-#: models.py:13
msgid "description"
msgstr "opis"
-#: models.py:14
+#: models.py:12
msgid "creation date"
msgstr "data utworzenia"
-#: models.py:15
+#: models.py:13
msgid "IP address"
msgstr "adres IP"
-#: models.py:20
+#: models.py:18
msgid "suggestion"
msgstr "sugestia"
-#: models.py:21
+#: models.py:19
msgid "suggestions"
msgstr "sugestie"
-#: views.py:33
+#: views.py:31
msgid "Report was sent successfully."
msgstr "Zgłoszenie zostało wysłane."
msgid "Report a bug or suggestion"
msgstr "Zgłoś błąd lub sugestię"
-#: templates/suggest.html:9
+#: templates/suggest.html:7
msgid "Send report"
msgstr "Wyślij zgłoszenie"
+
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-06-01 11:35+0200\n"
+"POT-Creation-Date: 2010-06-02 10:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:9
-msgid "Author"
+msgid "Contact"
msgstr ""
#: forms.py:10
-msgid "E-mail"
-msgstr ""
-
-#: forms.py:11
-msgid "Title"
-msgstr ""
-
-#: forms.py:12
msgid "Description"
msgstr ""
#: models.py:10
-msgid "author"
+msgid "contact"
msgstr ""
#: models.py:11
-msgid "e-mail"
-msgstr ""
-
-#: models.py:12
-msgid "title"
-msgstr ""
-
-#: models.py:13
msgid "description"
msgstr ""
-#: models.py:14
+#: models.py:12
msgid "creation date"
msgstr ""
-#: models.py:15
+#: models.py:13
msgid "IP address"
msgstr ""
-#: models.py:20
+#: models.py:18
msgid "suggestion"
msgstr ""
-#: models.py:21
+#: models.py:19
msgid "suggestions"
msgstr ""
-#: views.py:33
+#: views.py:31
msgid "Report was sent successfully."
msgstr ""
msgid "Report a bug or suggestion"
msgstr ""
-#: templates/suggest.html:9
+#: templates/suggest.html:7
msgid "Send report"
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-06-01 11:35+0200\n"
+"POT-Creation-Date: 2010-06-02 10:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:9
-msgid "Author"
+msgid "Contact"
msgstr ""
#: forms.py:10
-msgid "E-mail"
-msgstr ""
-
-#: forms.py:11
-msgid "Title"
-msgstr ""
-
-#: forms.py:12
msgid "Description"
msgstr ""
#: models.py:10
-msgid "author"
+msgid "contact"
msgstr ""
#: models.py:11
-msgid "e-mail"
-msgstr ""
-
-#: models.py:12
-msgid "title"
-msgstr ""
-
-#: models.py:13
msgid "description"
msgstr ""
-#: models.py:14
+#: models.py:12
msgid "creation date"
msgstr ""
-#: models.py:15
+#: models.py:13
msgid "IP address"
msgstr ""
-#: models.py:20
+#: models.py:18
msgid "suggestion"
msgstr ""
-#: models.py:21
+#: models.py:19
msgid "suggestions"
msgstr ""
-#: views.py:33
+#: views.py:31
msgid "Report was sent successfully."
msgstr ""
msgid "Report a bug or suggestion"
msgstr ""
-#: templates/suggest.html:9
+#: templates/suggest.html:7
msgid "Send report"
msgstr ""
# Adding model 'Suggestion'
db.create_table('suggest_suggestion', (
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=120)),
('ip', self.gf('django.db.models.fields.IPAddressField')(max_length=15)),
('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
- ('author', self.gf('django.db.models.fields.CharField')(max_length=120, blank=True)),
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('contact', self.gf('django.db.models.fields.CharField')(max_length=120, blank=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
- ('email', self.gf('django.db.models.fields.EmailField')(max_length=75, blank=True)),
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
))
db.send_create_signal('suggest', ['Suggestion'])
},
'suggest.suggestion': {
'Meta': {'object_name': 'Suggestion'},
- 'author': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'}),
+ 'contact': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
}
}
from django.utils.translation import ugettext_lazy as _
class Suggestion(models.Model):
- author = models.CharField(_('author'), blank=True, max_length=120)
- email = models.EmailField(_('e-mail'), blank=True)
- title = models.CharField(_('title'), max_length=120)
+ contact = models.CharField(_('contact'), blank=True, max_length=120)
description = models.TextField(_('description'), blank=True)
created_at = models.DateTimeField(_('creation date'), auto_now=True)
ip = models.IPAddressField(_('IP address'))
verbose_name_plural = _('suggestions')
def __unicode__(self):
- return self.title
+ return unicode(self.created_at)
\ No newline at end of file
<h2>{% trans "Report a bug or suggestion" %}</h2>
<form id='suggest-form' action="{% url suggest.views.report %}" method="post" accept-charset="utf-8" class="cuteform">
<ol>
- <li><label for="{{ form.author.id }}">{{ form.author.label }}</label> {{ form.author }}</li>
- <li><label for="{{ form.email.id }}">{{ form.email.label }}</label> {{ form.email }}</li>
- <li><label for="{{ form.title.id }}">{{ form.title.label }}</label> {{ form.title }}</li>
- <li><label for="{{ form.description.id }}">{{ form.description.label }}</label> {{ form.description }}</li>
+ <li><label for="id_contact">{{ form.contact.label }}</label> {{ form.contact }}</li>
+ <li><label for="id_description">{{ form.description.label }}</label> {{ form.description }}</li>
<li><input type="submit" value="{% trans "Send report" %}"/></li>
</ol>
</form>
\ No newline at end of file
def report(request):
suggest_form = forms.SuggestForm(request.POST)
if suggest_form.is_valid():
- author = suggest_form.cleaned_data['author']
- email = suggest_form.cleaned_data['email']
- title = suggest_form.cleaned_data['title']
+ contact = suggest_form.cleaned_data['contact']
description = suggest_form.cleaned_data['description']
- suggestion = Suggestion(author=author, email=email, title=title,
+ suggestion = Suggestion(contact=contact,
description=description, ip=request.META['REMOTE_ADDR'])
if request.user.is_authenticated():
suggestion.user = request.user