Giter Club home page Giter Club logo

django-messages's People

Contributors

a7p avatar agusmakmun avatar arneb avatar bradmontgomery avatar brandon-clair avatar chipx86 avatar chris7 avatar chrislawlor avatar frgtn avatar geyser avatar ghickman avatar hzamani avatar izimobil avatar jantoniomartin avatar jayliew avatar jedijulia avatar radimsuckr avatar rohitchopra32 avatar savelmtr avatar simonsmiley avatar urtzai avatar v1ct0r-lh avatar youknowone avatar zkanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-messages's Issues

django_messages/management.py", line 1, in <module> from django.db.models import get_models, signals ImportError: cannot import name get_models

django.db.models.get_model is deprecated from Django 1.9. It also doesn't look like get_models is used anywhere in django_messages/management.py

Can this import be removed safely?

Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
    utility.execute()
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/__init__.py", line 342, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute
    super(Command, self).execute(*args, **options)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/commands/test.py", line 90, in handle
    failures = test_runner.run_tests(test_labels)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/test/runner.py", line 532, in run_tests
    old_config = self.setup_databases()
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/test/runner.py", line 482, in setup_databases
    self.parallel, **kwargs
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/test/runner.py", line 726, in setup_databases
    serialize=connection.settings_dict.get("TEST", {}).get("SERIALIZE", True),
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/db/backends/base/creation.py", line 70, in create_test_db
    run_syncdb=True,
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/__init__.py", line 119, in call_command
    return command.execute(*args, **defaults)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 62, in handle
    import_module('.management', app_config.name)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/dude/.virtualenvs/foo/lib/python2.7/site-packages/django_messages/management.py", line 1, in <module>
    from django.db.models import get_models, signals
ImportError: cannot import name get_models

message_set is deprecated since Django 1.4

All forms are broken in Django 1.4.

Django Deprecation Timeline:

The Message model (in django.contrib.auth), its related manager in the User model (user.message_set), and the associated methods (user.message_set.create() and user.get_and_delete_messages()), will be removed. The messages framework should be used instead. The related messages variable returned by the auth context processor will also be removed. Note that this means that the admin application will depend on the messages context processor.

See https://docs.djangoproject.com/en/1.5/internals/deprecation/

Backend admin - Not Popups windows for look sender,received and parent msg in backend

I had two similar proyects. One for development and one for producctión.

In Development:
When i add a msg i pulse over magnifying glass icon I get de popups windows and run ok to selec sender, receiver and parent msg. (The URL of icon is ../admin/auth/user/?t=id)

In Production:
When i add a msg i pulse over magnifying glass icon I do not get de popups windows, the system go to user list and not back to message window. It is strange, the URL changed (The URL of icon is .../auth/user/?_to_field=id).

best regards

Pass Subject to Compose

This is a suggestion rather than an error.
I don't believe you can currently automatically populate the Subject Field on a new message (much like you can automatically select the user to receive the message).
If this can be done, I would be interested in how to implement. Otherwise, I am suggesting it as a future development.

ImportError: cannot import name 'patterns'

With Django 1.10 I'm getting the following stacktrace:

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "g:\Python\lib\site-packages\django\core\management\__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "g:\Python\lib\site-packages\django\core\management\__init__.py", line 359, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "g:\Python\lib\site-packages\django\core\management\base.py", line 294, in run_from_argv
    self.execute(*args, **cmd_options)
  File "g:\Python\lib\site-packages\django\core\management\base.py", line 342, in execute
    self.check()
  File "g:\Python\lib\site-packages\django\core\management\base.py", line 374, in check
    include_deployment_checks=include_deployment_checks,
  File "g:\Python\lib\site-packages\django\core\management\base.py", line 361, in _run_checks
    return checks.run_checks(**kwargs)
  File "g:\Python\lib\site-packages\django\core\checks\registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "g:\Python\lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config
    return check_resolver(resolver)
  File "g:\Python\lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver
    for pattern in resolver.url_patterns:
  File "g:\Python\lib\site-packages\django\utils\functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "g:\Python\lib\site-packages\django\urls\resolvers.py", line 313, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "g:\Python\lib\site-packages\django\utils\functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "g:\Python\lib\site-packages\django\urls\resolvers.py", line 306, in urlconf_module
    return import_module(self.urlconf_name)
  File "g:\Python\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "g:\Git\Jam\jam_music\urls.py", line 69, in <module>
    url(r'^messages/', include('django_messages.urls')),
  File "g:\Python\lib\site-packages\django\conf\urls\__init__.py", line 50, in include
    urlconf_module = import_module(urlconf_module)
  File "g:\Python\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "g:\Python\lib\site-packages\django_messages\urls.py", line 1, in <module>
    from django.conf.urls import patterns, url
ImportError: cannot import name 'patterns'

I believe that was deprecated in Django 1.8, have other people modified the source code in order to get this to work?

Python 3

Any plans on supporting Python 3 for this package?

Django-messages messages_inbox_count template tag not working as expected

1.pip install django-messages
2.added 'messages', to INSTALLED_APPS
3.added django-messages 'messages.context_processors.inbox', context processor to
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')]
,
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django_messages.context_processors.inbox',
],
},
},
]

Finally i am trying to use messages_inbox_count tag inside one of my template as follows:

Inbox ({{ messages_inbox_count }})

However, as expected this doesn't show up any inbox count on the page.

Mail templates location

Hi guys,

I have been desperately looking for the email notification templates such as templates/messages/new_message.html as found in translation files. For example:

#: templates/messages/new_message.html:1
#, python-format
msgid ""
"Hello %(recipient)s,\n"
"\n"
"you received a private message from %(sender)s with\n"
"the following contents:"
msgstr ""
"Bonjour %(recipient)s,\n"
"\n"
"vous avez reçu un message privé de %(sender)s avec\n"
"le contenu suivant :"

I would like to customize the sender here so I need to override the default template.

Thanks for your help !

Cheers,
Quentin

ImportError: cannot import name patterns

I included url conf in urls.py:

url(r'^messages/', include('django_messages.urls'))

And I get this:

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper fn(*args, **kwargs) File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\core\management\commands\runserver.py", line 121, in inner_run self.check(display_num_errors=True) File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\core\management\base.py", line 374, in check include_deployment_checks=include_deployment_checks, File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\core\management\base.py", line 361, in _run_checks return checks.run_checks(**kwargs) File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\core\checks\registry.py", line 81, in run_checks new_errors = check(app_configs=app_configs) File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config return check_resolver(resolver) File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver for pattern in resolver.url_patterns: File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\utils\functional.py", line 35, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\urls\resolvers.py", line 313, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\utils\functional.py", line 35, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\urls\resolvers.py", line 306, in urlconf_module return import_module(self.urlconf_name) File "c:\python27\Lib\importlib\__init__.py", line 37, in import_module __import__(name) File "C:\Users\zivan\Desktop\lobokus-django\lobokus\lobokus\urls.py", line 45, in <module> url(r'^messages/', include('django_messages.urls')), File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\conf\urls\__init__.py", line 50, in include urlconf_module = import_module(urlconf_module) File "c:\python27\Lib\importlib\__init__.py", line 37, in import_module __import__(name) File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django_messages\urls.py", line 1, in <module> from django.conf.urls import patterns, url ImportError: cannot import name patterns

Multiple recipient field

Why use CommaSeparatedUserField instead of a single ManyToMany field. Have any plans to support some kind of search integrated into the recipient field?

"send xyz a message" issue

Hi,

Im struggling to implement the url-based approach to preloading the compose-form with the recipient-user. I understand this is the URL:
url(r'^compose/(?P[\w.@+-]+)/$', compose, name='messages_compose_to'),
however how to i implement this into a user profile?
Please help

When will the new version ... present contains an error in the code.

Such an error I have:

  File ".../python3.4/site-packages/django_messages/templatetags/inbox.py", line 39
    raise TemplateSyntaxError, "first argument to inbox_count tag must be 'as' "

It is already fixed in the #30 , but in the repository PyPI, the current version 0.5.1 still contains the error.

When might be a new version in the repository PyPi?

page not found error

hi! I can't seem to get the urls. I already included django_messages.urls in my root urls.py. I tried accessing messages/inbox.html. It doesn't work.

I'm using django 1.6 btw

Fixing Arabic translation

I found a couple of mistakes in the Arabic translation. I would like to contribute and fix them, how can I do that?

Using recipient_filter with Sender Data

From what I can tell, it is not possible to use recipient_filter to disallow certain recipients based on the sender's data. For example, if the sender's email address is [email protected] and I only want the sender to be able to send messages to other users who also have an @example.com email address, there doesn't appear to be a way to do this. I think this would be a useful addition to this great Django package.

AttributeError at /admin/

Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/

Django Version: 1.4.1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'votepedia',
'messages')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1.                         request.path_info)
    
    File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
  2.                 sub_match = pattern.resolve(new_path)
    

Exception Type: AttributeError at /admin/
Exception Value: 'str' object has no attribute 'resolve'

Get latest version into PyPi

Is it possible to get this into the PyPi index to install with pip? I was unknowingly using the old 0.4 version when this one has been available for some time. Thanks!

Management Command for Deleting Deleted Messages

The trash.html template says:

Deleted Messages are removed from the trash at unregular intervals, don't rely on this feature for long-time storage.

I also saw this comment:

Hint: A Cron-Job could periodicly clean up old messages, which are deleted by sender and recipient.

It would be nice if django-messages provided a management command for deleting old messages so that all we have to do is set up a cron job that runs the management command (we don't have to write a management command ourselves).

By the way, both of the things I quoted above have typos. "unregular" should be "irregular" and "periodicly" should be "periodically".

Multiples Re: after some replies

Hi, i dont know if its a bug, but when two users send mails from the other in the same thread subjects raise the number of Re: for example

User 1 send a message to User 2 with Subject: Test Msg
User 2 reply thath message to User 1 with Subject: Re: Test Msg
User 1 reply a message to User 2 with Subject: Re: Re Test Msg
User 2 reply thath message to User 1 with Subject: Re: Re: Re: Test Msg
..

The messages in the inbox appears as differents messages and not like one thread.
there is any conflict with my project?

RemovedInDjango110Warning: django.conf.urls.patterns()

django_messages/urls.py:16: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead.
url(r'^trash/$', trash, name='messages_trash'),

Missing translations

Hi !

I noticed that there are missing translations for "No messages." at least in French and Spanish. I can make the update for French!

Cheers,
Quentin

Django 1.10 compatability

I tried to run the app on Django 1.10 and it had a few issues. Are there any plans to support this in the near future?

Django 1.10.5 ImportError: cannot import name patterns

Hi, i've an issue, i've installed django-messages in Version

django_messages.VERSION
(0, 5, 3)

via pip install, im using python 2.7 and i got this error


mrc@mrc-desktop:~/Work/traego$ python manage.py runserver
Performing system checks...

Unhandled exception in thread started by <function wrapper at 0x7f385efbe410>
Traceback (most recent call last):
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 121, in inner_run
    self.check(display_num_errors=True)
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/core/management/base.py", line 374, in check
    include_deployment_checks=include_deployment_checks,
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/core/management/base.py", line 361, in _run_checks
    return checks.run_checks(**kwargs)
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 14, in check_url_config
    return check_resolver(resolver)
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 24, in check_resolver
    for pattern in resolver.url_patterns:
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 313, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 306, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/mrc/Work/traego/traego/urls.py", line 83, in <module>
    url(r'^messages/', include('django_messages.urls')),
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 50, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/mrc/.virtualenvs/traego/local/lib/python2.7/site-packages/django_messages/urls.py", line 1, in <module>
    from django.conf.urls import patterns, url
ImportError: cannot import name patterns

should i install the lastet version? how do it do it? can do i via pip or i have to do it manually?
thanks

patterns has been depreciated with django 1.10

I'm setting up a new project and I'm getting the following error:

ImportError: cannot import name patterns

This is the traceback:

 File "/home/henry/Documents/yusuf/env/local/lib/python2.7/site-packages/django_messages/urls.py", line 1, in <module>
    from django.conf.urls import patterns, url

Modifying templates names Django 1.8

Trying to modify the template for inbox using

url(r'^inbox/$',
    inbox,
    {'template_name': 'my_inbox.html',},
    name='messages_inbox'),

I get
Exception Value: name 'inbox' is not defined

edit: turns out I just needed to import from django_messages.views import inbox, but that didn't fix anything. I still go to /messages/inbox/ and the template that is being rendered is the default one.

how to write form's ```recipienet``` field when I want to custom compose template?

I use django1.8 in python3.4.
I want to custom my own compose template.Here is my code:

<input id="id_recipient" class="form-control" name="recipient" type="text" value="{{form.recipient.value}}">

When I driectly reply a message,it will fill the value with a list of User Class.
qq 20151219204450.
Help! Are there some methods that I do not need modify the source code can solve my problem.Thanks.

Django 1.9 : django.db.models.signals.post_syncdb remplaced by post_migrate

file concerned management.py

Need to run:

 manage.py makemigrations django_messages

to create tables.

Why extends base.html in django_messages/base.html

I use python3 and django1.8,and install django_messages.
I did not change anything when I add django_messages in INSTALL_APP in settings.py.
Then when I access /messages, I meet a problem just like http://stackoverflow.com/questions/31458813/templatenotfound-after-installing-django-messages-and-django-postman .
If I comment the first line

{% extends "base.html" %}

in django_messages/base.html or add a my owner file base.html, both are worked.
Just like the title saying, Why?

Better handling of deleted messages

The docstring for the trash view says this (source):

Hint: A Cron-Job could periodicly clean up old messages, which are deleted by sender and recipient.

And the template says this (source):

Deleted Messages are removed from the trash at unregular intervals, don't rely on this feature for long-time storage.

This is not a very clean solution, in my opinion. I think it would be better to do this:

  1. Give developers an optional setting called something like MESSAGES_DELETED_MAX_AGE. If developers don't specify this setting, it could default to, say, 30 days.
  2. Modify the trash view so that it pulls in the user's deleted messages that are within the time period specified in the MESSAGES_DELETED_MAX_AGE setting.
  3. Modify the template's wording so that it says that the messages will no longer be accessible in the trash after the amount of time specified in the MESSAGES_DELETED_MAX_AGE setting.
  4. Modify the delete_deleted_messages management command so that the argument is optional instead of required. If the argument isn't given, default to the value of the MESSAGES_DELETED_MAX_AGE setting.

User to User Email via App

I know this is not an issue and I apologise for using this method to ask a question but I'm interested if you've considered extending the app to enable User to User email via the app, hiding the users' emails from each other. And how difficult do you think this extension would be?

relation "django_messages_message" does not exist

Cloned master branch of this repo, added app and context processor in settings, included urls and it seems like I have some problem with combining django-messages with database:

ProgrammingError at /messages/inbox/ relation "django_messages_message" does not exist LINE 1: SELECT COUNT(*) AS "__count" FROM "django_messages_message" ...

`

Request Method: GET
Request URL: http://127.0.0.1:8000/messages/inbox/

Django Version: 1.10.4
Python Version: 2.7.13
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.staticfiles',
'projects.apps.ProjectsConfig',
'users.apps.UsersConfig',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.twitter',
'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.github',
'taggit',
'haystack',
'django_countries',
'django_messages']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback:

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\core\handlers\exception.py" in inner
39. response = get_response(request)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\core\handlers\base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\core\handlers\base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\contrib\auth\decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django_messages\views.py" in inbox
31. 'message_list': message_list,

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\shortcuts.py" in render
30. content = loader.render_to_string(template_name, context, request, using=using)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\template\loader.py" in render_to_string
68. return template.render(context, request)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\template\backends\django.py" in render
66. return self.template.render(context)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\template\base.py" in render
206. with context.bind_template(self):

File "c:\python27\Lib\contextlib.py" in enter
17. return self.gen.next()

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\template\context.py" in bind_template
236. updates.update(processor(self.request))

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django_messages\context_processors.py" in inbox
5. return {'messages_inbox_count': inbox_count_for(request.user)}

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django_messages\models.py" in inbox_count_for
100. return Message.objects.filter(recipient=user, read_at__isnull=True, recipient_deleted_at__isnull=True).count()

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\db\models\query.py" in count
369. return self.query.get_count(using=self.db)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\db\models\sql\query.py" in get_count
476. number = obj.get_aggregation(using, ['__count'])['__count']

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\db\models\sql\query.py" in get_aggregation
457. result = compiler.execute_sql(SINGLE)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\db\models\sql\compiler.py" in execute_sql
835. cursor.execute(sql, params)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\db\backends\utils.py" in execute
79. return super(CursorDebugWrapper, self).execute(sql, params)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\db\backends\utils.py" in execute
64. return self.cursor.execute(sql, params)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\db\utils.py" in exit
94. six.reraise(dj_exc_type, dj_exc_value, traceback)

File "C:\Users\zivan\Desktop\lobokus-django\lib\site-packages\django\db\backends\utils.py" in execute
64. return self.cursor.execute(sql, params)

Exception Type: ProgrammingError at /messages/inbox/
Exception Value: relation "django_messages_message" does not exist
LINE 1: SELECT COUNT(*) AS "__count" FROM "django_messages_message" ...
^
`

inbox templatetags

line 39:
raise TemplateSyntaxError, "first argument to inbox_count tag must be 'as'"
is not a python3 format.

should be
raise TemplateSyntaxError("first argument to inbox_count tag must be 'as'")

DB table name changes

Since 0.5 changed its app name, default table name also changes from messages_message to django_messages_message. This is a rather radical change for people wanting to upgrade.

Two possible solutions:

  • Document this and ask the user to rename the table manually
  • Set Message.Meta.db_table to messages_message to ensure correct migration. Since 0.5 is not released yet, this should be a painless change for most people.

Pip version 0.6

Hey guys,

you haven't submitted the update of v 0.6 to pip. Could you do that please? Thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.