2

I am trying to use django-postman and I have successfully integrated it with my project. I want to use this application to give each user the ability to send messages to other users.

Can anybody point me in the right direction to do this thing.

Sachin
  • 3,672
  • 9
  • 55
  • 96

3 Answers3

3

After you make django-postman available on the Python path, you'll need to add it to the list of INSTALLED_APPS and initially configure it. For the time being, that will only provide with admin-based access to messages.

Adding (r'^messages/', include('postman.urls')), to your patterns in the root URL urls.py configuration will hook the django-postman views into your project and users will be able to access the messages interface there.

Make sure to have a look at the official documentation for more details.

Filip Dupanović
  • 32,650
  • 13
  • 84
  • 114
  • 2
    I am replying so late as I was out of town... I have done what you have written above.. I have included the postman views... And I am getting the interface for creating new messages and viewing inbox but I am unable to send any message. I mean when I send a message I put a registered user's username in the to field.. but the message is not received by the user... I have deactivated moderation – Sachin Dec 20 '11 at 08:09
  • I have this same problem, did you ever figure it out? – Murph Jun 14 '12 at 17:13
  • I have done the setup but when i hit the endpoint url it shows blank page. Any help? – Kishan Mehta Jun 17 '16 at 07:26
2

You must make sure that POSTMAN_AUTO_MODERATE_AS = True in settings.py. You mention in the comments that you have done so, but your problem resembles my initial hurdle and this fixed it. Others may face the same situation.

Old messages will still be marked as unmoderated in the database, so you may need to try to send new messages before it works.

KindOfGuy
  • 3,081
  • 5
  • 31
  • 47
1

I am putting this here because others may be having the same issue...

  • When sending messages from the admin area, messages are automatically listed as "pending" so even if POSTMAN_AUTO_MODERATE_AS = True, the message will not be sent (from admin).

  • When sending messages from a 'user' (from the 'site' & not 'admin' area), when POSTMAN_AUTO_MODERATE_AS = True, the message will automatically be accepted by the receiver.

Dex
  • 337
  • 1
  • 2
  • 10