From d712899291a689f0d4087ce5f36ef9011b03e5ef Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 2 Jun 2010 11:00:14 +0200 Subject: [PATCH 1/1] suggest without author, title --- apps/suggest/admin.py | 2 +- apps/suggest/forms.py | 4 +- apps/suggest/locale/de/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes apps/suggest/locale/de/LC_MESSAGES/django.po | 34 ++++----------- apps/suggest/locale/en/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes apps/suggest/locale/en/LC_MESSAGES/django.po | 34 ++++----------- apps/suggest/locale/es/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes apps/suggest/locale/es/LC_MESSAGES/django.po | 34 ++++----------- apps/suggest/locale/fr/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes apps/suggest/locale/fr/LC_MESSAGES/django.po | 34 ++++----------- apps/suggest/locale/lt/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes apps/suggest/locale/lt/LC_MESSAGES/django.po | 34 ++++----------- apps/suggest/locale/pl/LC_MESSAGES/django.mo | Bin 1076 -> 940 bytes apps/suggest/locale/pl/LC_MESSAGES/django.po | 41 ++++++------------- apps/suggest/locale/ru/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes apps/suggest/locale/ru/LC_MESSAGES/django.po | 34 ++++----------- apps/suggest/locale/uk/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes apps/suggest/locale/uk/LC_MESSAGES/django.po | 34 ++++----------- apps/suggest/migrations/0001_initial.py | 10 ++--- apps/suggest/models.py | 6 +-- apps/suggest/templates/suggest.html | 6 +-- apps/suggest/views.py | 6 +-- 22 files changed, 87 insertions(+), 226 deletions(-) diff --git a/apps/suggest/admin.py b/apps/suggest/admin.py index b8743dfe4..d1ce07b73 100644 --- a/apps/suggest/admin.py +++ b/apps/suggest/admin.py @@ -7,6 +7,6 @@ from django.contrib import admin 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) diff --git a/apps/suggest/forms.py b/apps/suggest/forms.py index fed55f6f5..7084effc1 100644 --- a/apps/suggest/forms.py +++ b/apps/suggest/forms.py @@ -6,7 +6,5 @@ from django import forms 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) diff --git a/apps/suggest/locale/de/LC_MESSAGES/django.mo b/apps/suggest/locale/de/LC_MESSAGES/django.mo index d9a9bc3fd4b72414766339d0efb971cd7168a9fe..2e4e772e61ed6edef65ccb4f1ad8762a849418b2 100644 GIT binary patch delta 17 ZcmaFQ^qy(L1a>0@Ljx-llZn%B0022(244UG delta 17 ZcmaFQ^qy(L1a?COLqjWL(}~k>0022#244UG diff --git a/apps/suggest/locale/de/LC_MESSAGES/django.po b/apps/suggest/locale/de/LC_MESSAGES/django.po index d4d2985bb..d6068e8a1 100644 --- a/apps/suggest/locale/de/LC_MESSAGES/django.po +++ b/apps/suggest/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" 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 \n" "Language-Team: LANGUAGE \n" @@ -17,54 +17,38 @@ msgstr "" "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 "" @@ -72,6 +56,6 @@ msgstr "" msgid "Report a bug or suggestion" msgstr "" -#: templates/suggest.html:9 +#: templates/suggest.html:7 msgid "Send report" msgstr "" diff --git a/apps/suggest/locale/en/LC_MESSAGES/django.mo b/apps/suggest/locale/en/LC_MESSAGES/django.mo index d9a9bc3fd4b72414766339d0efb971cd7168a9fe..2e4e772e61ed6edef65ccb4f1ad8762a849418b2 100644 GIT binary patch delta 17 ZcmaFQ^qy(L1a>0@Ljx-llZn%B0022(244UG delta 17 ZcmaFQ^qy(L1a?COLqjWL(}~k>0022#244UG diff --git a/apps/suggest/locale/en/LC_MESSAGES/django.po b/apps/suggest/locale/en/LC_MESSAGES/django.po index d4d2985bb..d6068e8a1 100644 --- a/apps/suggest/locale/en/LC_MESSAGES/django.po +++ b/apps/suggest/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" 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 \n" "Language-Team: LANGUAGE \n" @@ -17,54 +17,38 @@ msgstr "" "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 "" @@ -72,6 +56,6 @@ msgstr "" msgid "Report a bug or suggestion" msgstr "" -#: templates/suggest.html:9 +#: templates/suggest.html:7 msgid "Send report" msgstr "" diff --git a/apps/suggest/locale/es/LC_MESSAGES/django.mo b/apps/suggest/locale/es/LC_MESSAGES/django.mo index d9a9bc3fd4b72414766339d0efb971cd7168a9fe..2e4e772e61ed6edef65ccb4f1ad8762a849418b2 100644 GIT binary patch delta 17 ZcmaFQ^qy(L1a>0@Ljx-llZn%B0022(244UG delta 17 ZcmaFQ^qy(L1a?COLqjWL(}~k>0022#244UG diff --git a/apps/suggest/locale/es/LC_MESSAGES/django.po b/apps/suggest/locale/es/LC_MESSAGES/django.po index d4d2985bb..d6068e8a1 100644 --- a/apps/suggest/locale/es/LC_MESSAGES/django.po +++ b/apps/suggest/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" 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 \n" "Language-Team: LANGUAGE \n" @@ -17,54 +17,38 @@ msgstr "" "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 "" @@ -72,6 +56,6 @@ msgstr "" msgid "Report a bug or suggestion" msgstr "" -#: templates/suggest.html:9 +#: templates/suggest.html:7 msgid "Send report" msgstr "" diff --git a/apps/suggest/locale/fr/LC_MESSAGES/django.mo b/apps/suggest/locale/fr/LC_MESSAGES/django.mo index d9a9bc3fd4b72414766339d0efb971cd7168a9fe..2e4e772e61ed6edef65ccb4f1ad8762a849418b2 100644 GIT binary patch delta 17 ZcmaFQ^qy(L1a>0@Ljx-llZn%B0022(244UG delta 17 ZcmaFQ^qy(L1a?COLqjWL(}~k>0022#244UG diff --git a/apps/suggest/locale/fr/LC_MESSAGES/django.po b/apps/suggest/locale/fr/LC_MESSAGES/django.po index d4d2985bb..d6068e8a1 100644 --- a/apps/suggest/locale/fr/LC_MESSAGES/django.po +++ b/apps/suggest/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" 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 \n" "Language-Team: LANGUAGE \n" @@ -17,54 +17,38 @@ msgstr "" "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 "" @@ -72,6 +56,6 @@ msgstr "" msgid "Report a bug or suggestion" msgstr "" -#: templates/suggest.html:9 +#: templates/suggest.html:7 msgid "Send report" msgstr "" diff --git a/apps/suggest/locale/lt/LC_MESSAGES/django.mo b/apps/suggest/locale/lt/LC_MESSAGES/django.mo index d9a9bc3fd4b72414766339d0efb971cd7168a9fe..2e4e772e61ed6edef65ccb4f1ad8762a849418b2 100644 GIT binary patch delta 17 ZcmaFQ^qy(L1a>0@Ljx-llZn%B0022(244UG delta 17 ZcmaFQ^qy(L1a?COLqjWL(}~k>0022#244UG diff --git a/apps/suggest/locale/lt/LC_MESSAGES/django.po b/apps/suggest/locale/lt/LC_MESSAGES/django.po index d4d2985bb..d6068e8a1 100644 --- a/apps/suggest/locale/lt/LC_MESSAGES/django.po +++ b/apps/suggest/locale/lt/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" 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 \n" "Language-Team: LANGUAGE \n" @@ -17,54 +17,38 @@ msgstr "" "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 "" @@ -72,6 +56,6 @@ msgstr "" msgid "Report a bug or suggestion" msgstr "" -#: templates/suggest.html:9 +#: templates/suggest.html:7 msgid "Send report" msgstr "" diff --git a/apps/suggest/locale/pl/LC_MESSAGES/django.mo b/apps/suggest/locale/pl/LC_MESSAGES/django.mo index 97b6d685ebb3902f0a25b61a3ed559b15d1ad224..f03afa8e76397a87dc61f7a58b4dd7092197247e 100644 GIT binary patch delta 411 zcmXZXze)o^5XbSkz34`bNFo^UZvr+Jib`T(C1|CESSebCaB~?0YTmqt{ zg^iV@_9bk^SMUwQ?{GWtB}bzZK#GK1zf=*uA)9@9hdPCXE8y&e}^+T zKX^CIN@()HGI1&H= delta 584 zcmYL_ze~eV5XUcVZECI7`UAm6skDPjg`gt1DRma1Lved(sDav)p#L2(F!L5svo4C2C-+PJl;NIunyC2_6?)8UE(4R{Pk@7*OYDe@?hF=sb+b5uHBKg)26NJ zp|D%winf!h+p=YmK#}8yJ*`-_RE|8q*|a=WJqSILTpm7Y4c#o6=KAt#Xe1WmcrC0Y zUJKBJ+IGkG{$\n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -17,54 +17,38 @@ msgstr "" "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." @@ -72,6 +56,7 @@ 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" + diff --git a/apps/suggest/locale/ru/LC_MESSAGES/django.mo b/apps/suggest/locale/ru/LC_MESSAGES/django.mo index d9a9bc3fd4b72414766339d0efb971cd7168a9fe..2e4e772e61ed6edef65ccb4f1ad8762a849418b2 100644 GIT binary patch delta 17 ZcmaFQ^qy(L1a>0@Ljx-llZn%B0022(244UG delta 17 ZcmaFQ^qy(L1a?COLqjWL(}~k>0022#244UG diff --git a/apps/suggest/locale/ru/LC_MESSAGES/django.po b/apps/suggest/locale/ru/LC_MESSAGES/django.po index d4d2985bb..d6068e8a1 100644 --- a/apps/suggest/locale/ru/LC_MESSAGES/django.po +++ b/apps/suggest/locale/ru/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" 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 \n" "Language-Team: LANGUAGE \n" @@ -17,54 +17,38 @@ msgstr "" "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 "" @@ -72,6 +56,6 @@ msgstr "" msgid "Report a bug or suggestion" msgstr "" -#: templates/suggest.html:9 +#: templates/suggest.html:7 msgid "Send report" msgstr "" diff --git a/apps/suggest/locale/uk/LC_MESSAGES/django.mo b/apps/suggest/locale/uk/LC_MESSAGES/django.mo index d9a9bc3fd4b72414766339d0efb971cd7168a9fe..2e4e772e61ed6edef65ccb4f1ad8762a849418b2 100644 GIT binary patch delta 17 ZcmaFQ^qy(L1a>0@Ljx-llZn%B0022(244UG delta 17 ZcmaFQ^qy(L1a?COLqjWL(}~k>0022#244UG diff --git a/apps/suggest/locale/uk/LC_MESSAGES/django.po b/apps/suggest/locale/uk/LC_MESSAGES/django.po index d4d2985bb..d6068e8a1 100644 --- a/apps/suggest/locale/uk/LC_MESSAGES/django.po +++ b/apps/suggest/locale/uk/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" 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 \n" "Language-Team: LANGUAGE \n" @@ -17,54 +17,38 @@ msgstr "" "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 "" @@ -72,6 +56,6 @@ msgstr "" msgid "Report a bug or suggestion" msgstr "" -#: templates/suggest.html:9 +#: templates/suggest.html:7 msgid "Send report" msgstr "" diff --git a/apps/suggest/migrations/0001_initial.py b/apps/suggest/migrations/0001_initial.py index dca73ea0e..4c4a118f9 100644 --- a/apps/suggest/migrations/0001_initial.py +++ b/apps/suggest/migrations/0001_initial.py @@ -11,13 +11,11 @@ class Migration(SchemaMigration): # 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']) @@ -67,13 +65,11 @@ class Migration(SchemaMigration): }, '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'}) } } diff --git a/apps/suggest/models.py b/apps/suggest/models.py index f690bc831..f30387296 100644 --- a/apps/suggest/models.py +++ b/apps/suggest/models.py @@ -7,9 +7,7 @@ from django.contrib.auth.models import User 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')) @@ -21,5 +19,5 @@ class Suggestion(models.Model): verbose_name_plural = _('suggestions') def __unicode__(self): - return self.title + return unicode(self.created_at) \ No newline at end of file diff --git a/apps/suggest/templates/suggest.html b/apps/suggest/templates/suggest.html index a2d9d726e..c7fdd8128 100644 --- a/apps/suggest/templates/suggest.html +++ b/apps/suggest/templates/suggest.html @@ -2,10 +2,8 @@

{% trans "Report a bug or suggestion" %}

    -
  1. {{ form.author }}
  2. -
  3. {{ form.email }}
  4. -
  5. {{ form.title }}
  6. -
  7. {{ form.description }}
  8. +
  9. {{ form.contact }}
  10. +
  11. {{ form.description }}
\ No newline at end of file diff --git a/apps/suggest/views.py b/apps/suggest/views.py index cd733a840..4ad17046d 100644 --- a/apps/suggest/views.py +++ b/apps/suggest/views.py @@ -19,12 +19,10 @@ from catalogue.views import LazyEncoder 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 -- 2.20.1