Admin action not executed when no objects are selected

2009-04-07 Thread pault
I want to run an action from my admin when I press the GO button without having to select any objects. But it seems actions are only triggered when at least one object is selected. Does anyone know a workaround for this. --~--~-~--~~~---~--~~ You received this mess

multiple django versions in mod_python

2009-04-04 Thread pault
I have one version 1.02 installed in /var/lib/python-support/ python2.5/django/ (i am on a debian machine) and one version 0.96 in the folder of my project. I read the post from Graham but it doesn't seem to work for me it uses the 1.02 version. http://groups.google.com/group/django-users/brows

Re: assertRaises doesnt catch custom error

2009-02-15 Thread pault
like that as your option looks "better practice"? Thanks again for your help. regards Paul On Feb 15, 4:18 pm, Karen Tracey wrote: > On Sun, Feb 15, 2009 at 9:46 AM, pault wrote: > > > Malcom many thanks for your reply I created a new project and app to > > with

Re: assertRaises doesnt catch custom error

2009-02-15 Thread pault
and my tests.py http://dpaste.com/120843/ The only other thing I changed is add myproj.myapp to my INSTALLED_APPS On 15 feb, 03:31, Malcolm Tredinnick wrote: > On Sat, 2009-02-14 at 11:28 -0800, pault wrote: > > I have defined a custom error but if I test if custom error gets > >

assertRaises doesnt catch custom error

2009-02-14 Thread pault
I have defined a custom error but if I test if custom error gets raised it fails if I test for Exception the test passes class CustomError(Exception): """ This exception is my custom error """ class Company(models.Model): name = models.CharField(max_length=200) def test_erro

Re: 'Manager' object has no attribute 'get_or_create'

2006-07-07 Thread pault
No I just found out what the problem was I still had an old version installed django egg v0.94 (without get_or_create ) Pretty stupid but thanks a lot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: 'Manager' object has no attribute 'get_or_create'

2006-07-07 Thread pault
yes i am using the latest checkout version (on a windows xp pc with mysql) class Text(models.Model): tag = models.CharField(maxlength=50) tstamp = models.DateTimeField(auto_now_add=True) def __str__(self): return self.tag class Admin:

'Manager' object has no attribute 'get_or_create'

2006-07-07 Thread pault
I receive 'Manager' object has no attribute 'get_or_create' I keep on getting this error in this code: try: desc = 'blabla' t, created = Text.objects.get_or_create(tag=desc) except Exception, e: str(e) i am using the development version and maybe thats the reason for the error --~--~--