Enhance User Message System
|Reported by:||ckarrie||Owned by:||nobody|
|Severity:||Keywords:||user message enhancement|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I would like to see a enhanced user message system that allows to specify some base types of the message.
- message_type = 'Error'
- message_type = 'Success'
- message_type = 'Notice'
That would be very practicable if you do an custom action and want to display as a user message, if it has failed or not.
An example for validating a Model using a Admin Action for further calculations could look like this:
# admin.py (fictional code) def validate(modeladmin, request, queryset): for q in queryset.all(): message = u"%s: %s" %(q.name, q.validate()) if q.is_valid: message_type = 'Success' else: message_type = 'Error' request.user.message_set.create(message=message, message_type=message_type) validate.short_description = "Validate for Agl"
Change History (5)
comment:1 Changed 7 years ago by ramiro
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:3 Changed 7 years ago by kmtracey
- Resolution set to duplicate
- Status changed from new to closed