Re: Best way to batch select unique ids out of pool for sequences

2014-09-04 Thread James P
; single query: > > https://docs.djangoproject.com/en/dev/ref/models/querysets/#bulk-create > > This will probably be seconds, if not minutes faster. > > -James > > On Thursday, September 4, 2014, James P > > wrote: > >> I have what is essentially a table

Re: Best way to batch select unique ids out of pool for sequences

2014-09-04 Thread James P
I forgot to include the code where I set the pool codes to NOTFREE, here is the whole snippet. code_count=5000 pool_cds = CodePool.objects.filter(free_indicator=True)[:code_count] for pool_cd in pool_cds: new_item = Item.objects.create( pool_cd=p

Best way to batch select unique ids out of pool for sequences

2014-09-04 Thread James P
I have what is essentially a table which is a pool of available codes/sequences for unique keys when I create records elsewhere in the DB. Right now I run a transaction where I might grab 5000 codes out of an available pool of 1 billion codes using the slice operator [:code_count] where code_cou

Data stats package and reporting help

2014-07-31 Thread James P
I'm building a report builder for my Django app and could use a little advice. My reports are fairly simple where I accumulate scores of data (easy enough) but then I want to alter the report totals by varying dimensions (date ranges / split dates/weeks/months / owners / other metadata etc.).

Internal Request to third party inside a users request.

2014-07-07 Thread James P
I have a situation where I want to make a third party request INSIDE a current users request. Essentially I want to alter the traditional oauth2 flow where the user is redirected back to the Application after authorizing their credentials for the first time. I would like the Application to rece

Re: Registration extend nightmare

2014-06-02 Thread James P
I did my own extend and in the end I just created a one-to-one table for a user profile. When I extended Django-reg, I ended up overriding the user registration views for transactional processing of the additional table. On Monday, June 2, 2014 6:40:13 AM UTC-6, Matt Guy wrote: > > Thanks for yo

Testing Multiple Sequential Forms in one Test Function

2014-03-03 Thread James P
Hello, I am having trouble trying to figure out how to test a set of multiple forms being submitted sequentially. I tried using FormWizard which works fine when I test manually in the browser, my session variables pass intact and I can move through multiple forms and do my transaction processin

Advice for new Dev - package or roll own

2013-10-24 Thread James P
A little help / advice is needed here. I am getting back into web development since before the days of nice frameworks and decided to learn Python and use Django to get my web app going. My app has quite a few e-commerce features, but the cart/ordering/shipping/tracking aspect of my app is mayb