Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#11617 closed (duplicate)

Enhance User Message System

Reported by: ckarrie Owned by: nobody
Component: contrib.auth Version: 1.0
Severity: Keywords: user message enhancement
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi,

I would like to see a enhanced user message system that allows to specify some base types of the message.

For example:

  • 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"

Attachments (0)

Change History (5)

comment:1 Changed 5 years ago by ramiro

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I'm tempted to close this as a d uplicate of #4606 where the addition of a type to the message is one of the proposed/asked for features of a new messaging system.

comment:2 Changed 5 years ago by ramiro

oops, I meant #4604

comment:3 Changed 5 years ago by kmtracey

  • Resolution set to duplicate
  • Status changed from new to closed

It's a more direct duplicate of #3995.

comment:4 Changed 5 years ago by ckarrie

You're right, is a duplicate of 4604 and 3995, I'm sorry

comment:5 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.