0

I am trying to use Django-Postman and have gotten as far as being able to see the templates on the webpage after I press the link but I don't know how send messages works. According to the write view there should be a form loaded but all I get is the links to the other pages in the template. If someone could explain how to get this to work it would be fantastic.

<div class="navbar-collapse collapse">
      <ul class="nav navbar-nav ">
           <li><a href="{% url 'login.views.course' %}">MyCourse</a></li>
           <li><a href="{% url 'login.views.timetable' %}">Timetable</a></li>
           <li><a href="{% url 'login.views.logout_view' %}">logout</a></li>
           <li><a href="{% url 'postman:inbox' %}">Inbox</a></li>
      </ul>
</div> 

enter image description here

Luke Kavanagh
  • 229
  • 2
  • 5
  • 13

1 Answers1

0

Recently had to set up postman myself, and based just off your snippet, I'm going to assume you wrote the ul element yourself.

So, if that's the case, postman actually expects to handle all of that for you. According to the docs, you need to create a base.html template inside your own template directory. A few blocks are expected to be present inside this template, namely {% title %} (text it will add to the page's title), {% extrahead %} (some extra js and css), {% content %} (would contain the missing forms you're looking for) and {% postman_menu %} (the menu links automatically generated by postman).

You could always create the menu links yourself, but I'd suggest you create a /postman folder in your app's template folder, then copy the base.html from the installed postman app (this contains the code for how to layout the ul). Just a little more django-esque, and usefull if you need to fiddle with the names of the template tags, etc, but that's up to you.

Hope this helps, happy coding.

PyUnchained
  • 560
  • 1
  • 7
  • 16