error message in admin

2009-08-18 Thread Marek Palatinus
Hello, Im doing some validation in ModelAdmin.save_model(). I can cancel operation (just dont call parent method), but I also need to show some error message to user. Im able to call self.message_user() and show INFO message, but how to send ERROR message and maybe show form back and force user t

Re: error message in admin

2009-08-18 Thread Marek Palatinus
On Tue, Aug 18, 2009 at 12:22 PM, Joshua Russo wrote: > On Tue, Aug 18, 2009 at 8:52 AM, Marek Palatinus wrote: >> >> Hello, >> >> Im doing some validation in ModelAdmin.save_model(). I can cancel >> operation (just dont call parent method), but I also need to s

Re: Seamless integration of customized forms in my project

2009-08-18 Thread Marek Palatinus
On Tue, Aug 18, 2009 at 4:14 PM, Thierry wrote: > Should I stick with custom class names and refer to them throughout my > project instead? > Thanks for any feedback, > Thierry. > Hi, from side of python syntax, it is possible. See this example: mar...@kraksna:~/$ python Python 2.6.2 (release26

Re: The admin interface - this used to work?

2009-08-18 Thread Marek Palatinus
>  1. I have moved to the production server, and django is invoked with > apache & mod_wsgi (previously used the dev server). When using dev server, django serve all admin static files for you. Im not absolutely sure, but when you switch from dev server to another (im using fastcgi), you have to

Re: error message in admin

2009-08-18 Thread Marek Palatinus
On Tue, Aug 18, 2009 at 4:36 PM, Joshua Russo wrote: > On Tue, Aug 18, 2009 at 1:23 PM, Marek Palatinus wrote: >> >> On Tue, Aug 18, 2009 at 12:22 PM, Joshua Russo >> wrote: >> > On Tue, Aug 18, 2009 at 8:52 AM, Marek Palatinus >> > wrote: >> >>

Re: error message in admin

2009-08-18 Thread Marek Palatinus
On Tue, Aug 18, 2009 at 4:45 PM, Marek Palatinus wrote: > On Tue, Aug 18, 2009 at 4:36 PM, Joshua Russo wrote: >> On Tue, Aug 18, 2009 at 1:23 PM, Marek Palatinus wrote: >>> >>> On Tue, Aug 18, 2009 at 12:22 PM, Joshua Russo >>> wrote: >>> >

Re: how to access ForeignKey models properties?

2009-08-19 Thread Marek Palatinus
On Wed, Aug 19, 2009 at 10:04 AM, Daniel Roseman wrote: > photo_set = models.ForeignKey(PhotoSet, blank=True, null=True) Are you sure you have set up data in database correctly? Your model allow null value in photo_set, so maybe everything is working well and you forgot to fill database... ;) Ma