Tom, Arthur, thanks a lot.
I was infected with java container things.
I'm checking citated docs. (I thought after some reading,
middleware will be an answer, so i'll checking middleware too :)
Anna
_
Teljes körű pénzügyi
On 6/27/06, Tom Tobin <[EMAIL PROTECTED]> wrote:
> On 6/27/06, toth anna <[EMAIL PROTECTED]> wrote:
> >
> > Tom Tobin <[EMAIL PROTECTED]>:
> > > You should be able to get the behavior you want by
> > overriding the
> > > save() method on your models.
> >
> > Is there any usable examples somewhere
In your model, overide the save method :
def save(self):
# get number of objects
maxNumber = 5
current = MyModel.objects.all().count()
if current < maxNumber:
super(MyModel, self).save()
#you can either pass - object won't be saved, or raise an exception
cheers,
arthu
On 6/27/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> On Jun 27, 2006, at 9:58 AM, toth anna wrote:
> > I'm working on my thesis in our academy (i have to
> > implement, too).
> > Searching for an enviroment, i found django, and it looks
> > very nice.
> > After reading tutorial, i have som
On Jun 27, 2006, at 9:58 AM, toth anna wrote:
> I'm working on my thesis in our academy (i have to
> implement, too).
> Searching for an enviroment, i found django, and it looks
> very nice.
> After reading tutorial, i have some questions (and more to
> come...:) before i fall in love with it.
>
>
5 matches
Mail list logo