arneb / django-messages Goto Github PK
View Code? Open in Web Editor NEWA Django application handling private messages between users.
License: BSD 3-Clause "New" or "Revised" License
A Django application handling private messages between users.
License: BSD 3-Clause "New" or "Revised" License
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
Is it currently possible to message all users instead of having to specify each one in the recipient box?
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/
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
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.
Hi, as what I've said above, but I'm having difficulties on how should I run the test, from the other Django thirdparty I've seen is that they provide runtest.py. How to do this here? Or maybe I'm missing something?
Thanks.
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?
Any plans on supporting Python 3 for this package?
Hello
I think if we use
try:
from django.utils import timezone
except:
from datetime import datetime as timezone
it will make the code still work with django 1.3
Kind Regards
Enoch
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.
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
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
I ask this cause it seems to use some features that have been deprecated since 1.8 .
Why use CommaSeparatedUserField instead of a single ManyToMany field. Have any plans to support some kind of search integrated into the recipient field?
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
I noticed that the "compose" view documents all of the arguments except for recipient_filter
:
https://github.com/arneb/django-messages/blob/messages-0.5.1/django_messages/views.py#L63-L73
I also didn't see any documentation for it at http://django-messages.readthedocs.org/en/latest/
Hey,
when I am sending a message the "message sent" notification is shown.
But the receiver does not get the "message received" notification.
Is there any chance that I am missing something?
EDIT
It seems that the "notification" app has changed its name:
https://pinax-notifications.readthedocs.io/en/latest/
It is now called pinax.notifications
Can you fix this?
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?
Will it ever be compatible with 1.8?
In you project no css static files.
Why this unit?
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
This issue is noticed in django 1.9. It can be resolved by template overriding. I think it will be better if the {% load url from future %} is removed from templates.
I found a couple of mistakes in the Arabic translation. I would like to contribute and fix them, how can I do that?
The new_message_email
function sends email in plain text only. It would be nice if there was an html_template_name
(or template_name_html
) argument.
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.
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
request.path_info)
sub_match = pattern.resolve(new_path)
Exception Type: AttributeError at /admin/
Exception Value: 'str' object has no attribute 'resolve'
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!
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".
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?
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'),
I'm looking for the ability to change the database for messages. Is there an easy configuration in the Messages Meta of models?
Hello, this is a wonderful package, however it is compatible with python 3?
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
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?
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
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
is there any plan to make this package for python3.
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.
So is it compatible with v1.8?
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
.
.
Help! Are there some methods that I do not need modify the source code can solve my problem.Thanks.
file concerned management.py
https://docs.djangoproject.com/en/1.9/releases/1.7/#deprecated-features-1-7
A new makemigrations command provides an easy way to autodetect changes to your models and make migrations for them.
django.db.models.signals.pre_syncdb and django.db.models.signals.post_syncdb have been deprecated, to be replaced by pre_migrate and post_migrate respectively. These new signals have slightly different arguments. Check the documentation for details.
Need to run:
manage.py makemigrations django_messages
to create tables.
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?
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:
MESSAGES_DELETED_MAX_AGE
. If developers don't specify this setting, it could default to, say, 30 days.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.MESSAGES_DELETED_MAX_AGE
setting.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.Why there are no any migrations? Do you plan to add them?
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?
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" ...
^
`
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'")
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:
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.Hey guys,
you haven't submitted the update of v 0.6 to pip. Could you do that please? Thx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.