Permalink
Browse files

Merge branch 'master' of github.com:Gidsy/django-threaded-messages

Conflicts:
	.gitignore
  • Loading branch information...
2 parents 1bc5db4 + ebfa8c7 commit 57b3f5a703df690c19ac8bc1319e1d4f132ad985 @jezdez jezdez committed Nov 20, 2012
View
@@ -1,3 +1,3 @@
*.pyc
dist/
-*.egg-info
+*.egg-info
View
@@ -0,0 +1,47 @@
+# file GENERATED by distutils, do NOT edit
+LICENSE.txt
+README.rst
+setup.py
+threaded_messages/__init__.py
+threaded_messages/admin.py
+threaded_messages/context_processors.py
+threaded_messages/fields.py
+threaded_messages/forms.py
+threaded_messages/listeners.py
+threaded_messages/management.py
+threaded_messages/models.py
+threaded_messages/search_indexes.py
+threaded_messages/settings.py
+threaded_messages/tests.py
+threaded_messages/urls.py
+threaded_messages/utils.py
+threaded_messages/views.py
+threaded_messages/locale/de/LC_MESSAGES/django.mo
+threaded_messages/locale/de/LC_MESSAGES/django.po
+threaded_messages/locale/en/LC_MESSAGES/django.po
+threaded_messages/locale/es/LC_MESSAGES/django.po
+threaded_messages/locale/fr/LC_MESSAGES/django.po
+threaded_messages/locale/it/LC_MESSAGES/django.po
+threaded_messages/migrations/0001_initial.py
+threaded_messages/migrations/0002_auto__add_field_thread_sender.py
+threaded_messages/migrations/0003_auto__add_field_thread_replied.py
+threaded_messages/migrations/0004_auto.py
+threaded_messages/migrations/__init__.py
+threaded_messages/static/css/token-input.css
+threaded_messages/static/js/jquery-1.5.2.min.js
+threaded_messages/static/js/jquery.form.js
+threaded_messages/static/js/jquery.tokeninput.js
+threaded_messages/templates/django_messages/base.html
+threaded_messages/templates/django_messages/compose.html
+threaded_messages/templates/django_messages/inbox.html
+threaded_messages/templates/django_messages/message_list_view.html
+threaded_messages/templates/django_messages/message_reply.html
+threaded_messages/templates/django_messages/modal_compose.html
+threaded_messages/templates/django_messages/new_message.html
+threaded_messages/templates/django_messages/outbox.html
+threaded_messages/templates/django_messages/search.html
+threaded_messages/templates/django_messages/trash.html
+threaded_messages/templates/django_messages/view.html
+threaded_messages/templatetags/__init__.py
+threaded_messages/templatetags/inbox.py
+threaded_messages/templatetags/truncchar_tag.py
@@ -1,2 +1,2 @@
-VERSION = (0, 1, 30)
+VERSION = (0, 1, 35)
__version__ = '.'.join(map(str, VERSION))
View
@@ -1,18 +1,17 @@
-from django import forms
-from django.conf import settings
-from django.utils.translation import gettext_lazy as _
from django.contrib import admin
-from django.contrib.auth.models import User, Group
from threaded_messages.models import *
-
-
class MessageAdmin(admin.ModelAdmin):
- list_display = ('sender', 'sent_at','body')
+ list_display = ('sender', 'sent_at', 'body')
ordering = ('-sent_at',)
search_fields = ('body', 'sender__first_name',
'sender__last_name', 'sender__username')
+ raw_id_fields = ('sender', 'parent_msg')
+ readonly_fields = ('subject',)
+
+ def subject(self, msg):
+ return msg.thread.all()[0].subject
admin.site.register(Message, MessageAdmin)
@@ -3,130 +3,135 @@
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
-#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-03-22 11:56+0100\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"
+"PO-Revision-Date: 2011-12-07 02:03-0500\n"
+"Last-Translator: Salvatore Iovene <salvatore@iovene.com>\n"
+"Language-Team: Italian <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-Language: Italian\n"
+"X-Poedit-Country: Italy\n"
+"X-Poedit-SourceCharset: utf-8\n"
#: fields.py:56
#, python-format
msgid "The following usernames are incorrect: %(users)s"
-msgstr ""
+msgstr "I seguenti nomi utenti sono incorretti: %(users)s"
#: forms.py:19
msgid "Recipient"
-msgstr ""
+msgstr "Destinatario"
-#: forms.py:20 models.py:84
+#: forms.py:20
+#: models.py:84
msgid "Subject"
-msgstr ""
+msgstr "Soggetto"
#: forms.py:21
msgid "Body"
-msgstr ""
+msgstr "Messaggio"
#: forms.py:62
msgid "Reply"
-msgstr ""
+msgstr "Rispondi"
#: management.py:8
msgid "Received a Message"
-msgstr ""
+msgstr "Messaggio ricevuto"
#: management.py:8
msgid "Someone has sent you a message"
-msgstr ""
+msgstr "Hai ricevuto un messaggio"
#: models.py:61
msgid "body"
-msgstr ""
+msgstr "messaggio"
#: models.py:62
msgid "sender"
-msgstr ""
+msgstr "mittente"
#: models.py:63
msgid "parent message"
-msgstr ""
+msgstr "messaggio originale"
#: models.py:64
msgid "sent at"
-msgstr ""
+msgstr "spedito alle"
#: models.py:76
msgid "Message"
-msgstr ""
+msgstr "Messaggio"
-#: models.py:77 models.py:86
+#: models.py:77
+#: models.py:86
msgid "Messages"
-msgstr ""
+msgstr "Messaggi"
#: models.py:85
msgid "Latest message"
-msgstr ""
+msgstr "Ultimo messaggio"
#: models.py:97
msgid "Thread"
-msgstr ""
+msgstr "Conversazione"
#: models.py:98
msgid "Threads"
-msgstr ""
+msgstr "Conversazioni"
#: models.py:105
msgid "message thread"
-msgstr ""
+msgstr "conversazione"
#: models.py:106
msgid "participant users"
-msgstr ""
+msgstr "utenti partecipanti"
#: models.py:107
msgid "read at"
-msgstr ""
+msgstr "letto alle"
#: models.py:108
msgid "replied at"
-msgstr ""
+msgstr "risposto alle"
#: models.py:109
msgid "deleted at"
-msgstr ""
+msgstr "cancellato alle"
#: models.py:134
msgid "participant"
-msgstr ""
+msgstr "partecipante"
#: models.py:135
msgid "participants"
-msgstr ""
+msgstr "partecipanti"
#: utils.py:20
#, python-format
msgid "New Message: %(subject)s"
-msgstr ""
+msgstr "Nuovo messaggio: %(subject)s"
#: views.py:102
msgid "Message successfully sent."
-msgstr ""
+msgstr "Messaggio spedito."
#: views.py:143
msgid "Conversation successfully deleted."
-msgstr ""
+msgstr "Conversazione cancellata."
#: views.py:164
msgid "Conversation successfully recovered."
-msgstr ""
+msgstr "Conversazione ripristinata."
#: views.py:190
msgid "Reply successfully sent."
-msgstr ""
+msgstr "Risposta spedita."
+
@@ -1,11 +1,11 @@
from django.conf import settings
-from django.utils.translation import ugettext_noop as _
from django.db.models import signals
if "notification" in settings.INSTALLED_APPS:
from notification import models as notification
+
def create_notice_types(app, created_models, verbosity, **kwargs):
- notification.create_notice_type("received_email", _("Received a Message"), _("Someone has sent you a message"))
+ notification.create_notice_type("received_email", "Private messages", "(this is highly recommended)")
signals.post_syncdb.connect(create_notice_types, sender=notification)
else:
- print "Skipping creation of NoticeTypes (Threaded Messages) as notification app not found"
+ print "Skipping creation of NoticeTypes (Threaded Messages) as notification app not found"
@@ -0,0 +1,117 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding index on 'Participant', fields ['replied_at']
+ db.create_index('threaded_messages_participant', ['replied_at'])
+
+ # Adding index on 'Participant', fields ['read_at']
+ db.create_index('threaded_messages_participant', ['read_at'])
+
+ # Adding index on 'Participant', fields ['deleted_at']
+ db.create_index('threaded_messages_participant', ['deleted_at'])
+
+ # Adding index on 'Message', fields ['sent_at']
+ db.create_index('threaded_messages_message', ['sent_at'])
+
+
+ def backwards(self, orm):
+ # Removing index on 'Message', fields ['sent_at']
+ db.delete_index('threaded_messages_message', ['sent_at'])
+
+ # Removing index on 'Participant', fields ['deleted_at']
+ db.delete_index('threaded_messages_participant', ['deleted_at'])
+
+ # Removing index on 'Participant', fields ['read_at']
+ db.delete_index('threaded_messages_participant', ['read_at'])
+
+ # Removing index on 'Participant', fields ['replied_at']
+ db.delete_index('threaded_messages_participant', ['replied_at'])
+
+
+ models = {
+ 'actstream.action': {
+ 'Meta': {'ordering': "('-timestamp',)", 'object_name': 'Action'},
+ 'action_object_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'action_object'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
+ 'action_object_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'actor_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actor'", 'to': "orm['contenttypes.ContentType']"}),
+ 'actor_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'target_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'target'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
+ 'target_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'timestamp': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'verb': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'threaded_messages.message': {
+ 'Meta': {'ordering': "['-sent_at']", 'object_name': 'Message'},
+ 'body': ('django.db.models.fields.TextField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'parent_msg': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'next_messages'", 'null': 'True', 'to': "orm['threaded_messages.Message']"}),
+ 'sender': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'sent_messages'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'sent_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'})
+ },
+ 'threaded_messages.participant': {
+ 'Meta': {'ordering': "['thread']", 'object_name': 'Participant'},
+ 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'read_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'replied_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'thread': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'participants'", 'to': "orm['threaded_messages.Thread']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'threads'", 'to': "orm['auth.User']"})
+ },
+ 'threaded_messages.thread': {
+ 'Meta': {'ordering': "['latest_msg']", 'object_name': 'Thread'},
+ 'all_msgs': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'thread'", 'symmetrical': 'False', 'to': "orm['threaded_messages.Message']"}),
+ 'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_threads'", 'to': "orm['auth.User']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'latest_msg': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'thread_latest'", 'to': "orm['threaded_messages.Message']"}),
+ 'replied': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'subject': ('django.db.models.fields.CharField', [], {'max_length': '120'})
+ }
+ }
+
+ complete_apps = ['threaded_messages']
Oops, something went wrong.

0 comments on commit 57b3f5a

Please sign in to comment.