Is there a way to dumpdata truncate to last n lines?

2010-08-30 Thread rh0dium
Hi Folks, Is there anyway to dump the last 'n' lines of the db. I like to build test fixtures but with 3M lines it's a bit much... Thanks --- Steven M. Klass ☎ 1 (480) 225-1112 ✉ skl...@pointcircle.com -- You received this message because you are subscribed to the Google Groups "Django u

How does my model look?

2009-08-24 Thread rh0dium
Hi Guys, Relative newbie and I want to ensure I'm getting started on the right track. How does this model look? # encoding: utf-8 """ class P4Document(models.Model): depotfile = models.CharField(max_length=1024) action= models.CharField(choices=(("add","Add"),

Models.py and overriding the get_or_create class method. Help please with obj = self.model(**params)

2009-08-19 Thread rh0dium
Hi all, I have a class in which I want to override the get_or_create method. Basically if my class doesn't store the answer I want it do some process to get the answer and it's not provided. The method is really a get_or_retrieve method. I have heavily borrowed this from db/models/ query.py and

Re: ManyToMany Model.py and the shell..

2009-08-15 Thread rh0dium
'change'] entry.desc= item['desc'] entry.status = item['status'] entry.time= datetime.datetime.fromtimestamp(float(item['time'])) entry.client.add(getOrCreateClient(item['client'])) entry.save() A bit better but still could be clea

ManyToMany Model.py and the shell..

2009-08-14 Thread rh0dium
Hi Guys, First post to the group I did do a search and came up dry. I also own the django book (Forcier,Bissex,Chun) and they don't explain how to do this. In short I can't figure out how to progmatically add a data via a python shell script to the ManyToMay model.. --- models.py --- from djan