Commits

Luke Plant committed e02bedb

Made use of messages for shelving/unshelving/deleting items in basket

  • Participants
  • Parent commits 4aadb80
  • Branches bookings

Comments (0)

Files changed (1)

cciw/bookings/views.py

 import re
 
 from django.conf import settings
+from django.contrib import messages
 from django.core.urlresolvers import reverse, reverse_lazy
 from django.http import HttpResponseRedirect, Http404
 from django.views.generic.base import TemplateView, TemplateResponseMixin
         form.instance.agreement_date = datetime.now()
         form.instance.auto_set_amount_due()
         form.instance.state = BOOKING_INFO_COMPLETE
+        messages.info(self.request, 'Details for "%s" were saved successfully' % form.instance.name)
         return super(BookingEditAddBase, self).form_valid(form)
 
 
         def shelve(place):
             place.shelved = True
             place.save()
+            messages.info(self.request, 'Place for "%s" moved to shelf' % place.name)
 
         def unshelve(place):
             place.shelved = False
             place.save()
+            messages.info(self.request, 'Place for "%s" moved to basket' % place.name)
 
         def delete(place):
+            messages.info(self.request, 'Place for "%s" deleted' % place.name)
             place.delete()
 
         def edit(place):