Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » how to raise an error on django admin [RSS Feed]

#1 Jan. 3, 2011 17:26:22

rahul j.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

how to raise an error on django admin


Hi,

How to display an error in django admin (the error should be displayed in
red just like in forms)

Something of this formhttp://groups.google.com/group/django-users/browse_thread/thread/68d4ea1915654134/447ef8473cf86672Thanks.

Rahul

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 3, 2011 21:40:52

A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

how to raise an error on django admin


I'd like to know this too.

On 3 January 2011 17:25, rahul jain <jainwolver...@gmail.com> wrote:
> Hi,
>
> How to display an error in django admin (the error should be displayed in
> red just like in forms)
>
> Something of this form
>
>http://groups.google.com/group/django-users/browse_thread/thread/68d4ea1915654134/447ef8473cf86672>
> Thanks.
>
> Rahul
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 5, 2011 02:22:04

Daniel C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

how to raise an error on django admin


I think the way to do is:

from django.contrib import messages

then somewhere...
messages.add_message(request, messages.ERROR, "your error message")

The message will be displayed in the top of the next admin page



On 01/03/2011 09:40 PM, Acorn wrote:
> I'd like to know this too.
>
> On 3 January 2011 17:25, rahul jain <jainwolver...@gmail.com> wrote:
>> Hi,
>>
>> How to display an error in django admin (the error should be displayed in
>> red just like in forms)
>>
>> Something of this form
>>
>>http://groups.google.com/group/django-users/browse_thread/thread/68d4ea1915654134/447ef8473cf86672>>
>> Thanks.
>>
>> Rahul
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>>http://groups.google.com/group/django-users?hl=en.
>>
>signature.ascDescription:OpenPGP digital signature

Attachments:
attachment signature.asc (554 bytes)

Offline

  • Root
  • » Django
  • » how to raise an error on django admin [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support