Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7806335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:30:06+00:00 2026-06-02T02:30:06+00:00

In Django 1.3 and prior you could send a message to a particular user

  • 0

In Django 1.3 and prior you could send a message to a particular user using:

user.message_set.create(message='some message text')

as of Django 1.4 this functionality has been removed in favor of the messaging framework. The messaging framework uses the following syntax:

info(request, 'some message text')

I am wondering if it is possible to queue a message for a particular user, as the old method allowed, rather than just for the user in request.user? So in a view I would want to be able to do something like the following:

susy = User.objects.get(username='susy')

# send a message to susy even though request.user is john
info(susy, 'some message text')
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:30:08+00:00Added an answer on June 2, 2026 at 2:30 am

    Default storage engine for messages are now user cookies, meaning you cannot store message for anyone but current user. To work around this, you can try using session backend, fetching required user’s session and write a message directly there — just check how backend itself implements it in its source and use the same approach.

    Obviously, this won’t work if your sessions are cookie-based as well.

    If solution needs to be reliable and not depend on app configuration, you’ll need to create custom db-based solution for message handling. For example, you can implement your own db-based storage engine for messages framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Django auth User model has a date_joined DateTimeField . Could this be used to
Django newbie at work and I could use some pointers. I'm using django-profile and
Django has truncatewords template tag, which cuts the text at the given word count.
A] Summary: Using get or insert functionality on one to many django models, checking
I'm having some difficulty getting my django tests to run properly; I'm using nose,
Django's auth messages look pretty handy for notifying a CMS user of some configuration
Django lets you create a model foreign-keyed to User and define it in settings
I am using django HttpResponseRedirect(url) to redirect the user to a new url, but
Prior to today, I've been using Django 1.1. To ensure I'm keeping up with
django's manager docs has a paragraph overwritten with DO NOT FILTER AWAY ANY RESULTS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.