librelist archives

« back to archive

Question

Question

From:
Kevin Cullinane
Date:
2010-07-16 @ 16:23
I am a scripter mostly, looking to branch out. I did the tutorial, and I
have been modifying it to make a little inventory system (using an sqlite
tutorial in concert with the flask tutorial). I have made some changes, and
everything seems kosher, except the show entries is showing the title and id
and the other fields I added just show [3] [4] [5]. This is a dropbox url to
a zip file with the code.

http://dl.dropbox.com/u/5863544/inv_flask.zip

Thanks in advance for the help

Kevin

Re: [flask] Question

From:
Dan Colish
Date:
2010-07-16 @ 16:25
On Jul 16, 2010, at 9:23 AM, Kevin Cullinane wrote:

> I am a scripter mostly, looking to branch out. I did the tutorial, and I
have been modifying it to make a little inventory system (using an sqlite 
tutorial in concert with the flask tutorial). I have made some changes, 
and everything seems kosher, except the show entries is showing the title 
and id and the other fields I added just show [3] [4] [5]. This is a 
dropbox url to a zip file with the code.
> 
> http://dl.dropbox.com/u/5863544/inv_flask.zip
> 
> Thanks in advance for the help
> 
> Kevin

Could you put you code somewhere we can get at it in a non-binary form?

--Dan

Re: [flask] Question

From:
Kevin Cullinane
Date:
2010-07-16 @ 16:35
sorry, didn't think, just changed file in the zip to .txt

On Fri, Jul 16, 2010 at 12:25 PM, Dan Colish <dcolish@gmail.com> wrote:

>
> On Jul 16, 2010, at 9:23 AM, Kevin Cullinane wrote:
>
> > I am a scripter mostly, looking to branch out. I did the tutorial, and I
> have been modifying it to make a little inventory system (using an sqlite
> tutorial in concert with the flask tutorial). I have made some changes, and
> everything seems kosher, except the show entries is showing the title and id
> and the other fields I added just show [3] [4] [5]. This is a dropbox url to
> a zip file with the code.
> >
> > http://dl.dropbox.com/u/5863544/inv_flask.zip
> >
> > Thanks in advance for the help
> >
> > Kevin
>
> Could you put you code somewhere we can get at it in a non-binary form?
>
> --Dan
>

Re: [flask] Question

From:
Dan Jacob
Date:
2010-07-16 @ 16:44
If it's a small bit of code, put the relevant part of the code in a pastebin:

http://paste.pocoo.org/

If it's a lot of code, use a github or bitbucket repository.

On 16 July 2010 17:35, Kevin Cullinane <kevin.cullinane@gmail.com> wrote:
> sorry, didn't think, just changed file in the zip to .txt
>
> On Fri, Jul 16, 2010 at 12:25 PM, Dan Colish <dcolish@gmail.com> wrote:
>>
>> On Jul 16, 2010, at 9:23 AM, Kevin Cullinane wrote:
>>
>> > I am a scripter mostly, looking to branch out. I did the tutorial, and I
>> > have been modifying it to make a little inventory system (using an sqlite
>> > tutorial in concert with the flask tutorial). I have made some changes, and
>> > everything seems kosher, except the show entries is showing the title and id
>> > and the other fields I added just show [3] [4] [5]. This is a dropbox url to
>> > a zip file with the code.
>> >
>> > http://dl.dropbox.com/u/5863544/inv_flask.zip
>> >
>> > Thanks in advance for the help
>> >
>> > Kevin
>>
>> Could you put you code somewhere we can get at it in a non-binary form?
>>
>> --Dan
>
>

Re: [flask] Question

From:
Kevin Cullinane
Date:
2010-07-16 @ 16:48
http://paste.pocoo.org/show/238359/

On Fri, Jul 16, 2010 at 12:44 PM, Dan Jacob <danjac354@gmail.com> wrote:

> If it's a small bit of code, put the relevant part of the code in a
> pastebin:
>
> http://paste.pocoo.org/
>
> If it's a lot of code, use a github or bitbucket repository.
>
> On 16 July 2010 17:35, Kevin Cullinane <kevin.cullinane@gmail.com> wrote:
> > sorry, didn't think, just changed file in the zip to .txt
> >
> > On Fri, Jul 16, 2010 at 12:25 PM, Dan Colish <dcolish@gmail.com> wrote:
> >>
> >> On Jul 16, 2010, at 9:23 AM, Kevin Cullinane wrote:
> >>
> >> > I am a scripter mostly, looking to branch out. I did the tutorial, and
> I
> >> > have been modifying it to make a little inventory system (using an
> sqlite
> >> > tutorial in concert with the flask tutorial). I have made some
> changes, and
> >> > everything seems kosher, except the show entries is showing the title
> and id
> >> > and the other fields I added just show [3] [4] [5]. This is a dropbox
> url to
> >> > a zip file with the code.
> >> >
> >> > http://dl.dropbox.com/u/5863544/inv_flask.zip
> >> >
> >> > Thanks in advance for the help
> >> >
> >> > Kevin
> >>
> >> Could you put you code somewhere we can get at it in a non-binary form?
> >>
> >> --Dan
> >
> >
>

Re: [flask] Question

From:
Dan Colish
Date:
2010-07-16 @ 16:57
Hey Kevin, 

in this line:

    entries = [dict(IdNum=row[0], ItemDesc=row[1], InStock=[2], 
PackQty=[3], ItemCost=[4]) for row in cur.fetchall()]

you should put `row` before all the array indexes, like so:

    entries = [dict(IdNum=row[0], ItemDesc=row[1], InStock=row[2], 
PackQty=row[3], ItemCost=row[4]) for row in cur.fetchall()]

Otherwise, you're not getting at the array variable row, you're creating a
new array.

--Dan


On Jul 16, 2010, at 9:48 AM, Kevin Cullinane wrote:

> http://paste.pocoo.org/show/238359/
> 
> On Fri, Jul 16, 2010 at 12:44 PM, Dan Jacob <danjac354@gmail.com> wrote:
> If it's a small bit of code, put the relevant part of the code in a pastebin:
> 
> http://paste.pocoo.org/
> 
> If it's a lot of code, use a github or bitbucket repository.
> 
> On 16 July 2010 17:35, Kevin Cullinane <kevin.cullinane@gmail.com> wrote:
> > sorry, didn't think, just changed file in the zip to .txt
> >
> > On Fri, Jul 16, 2010 at 12:25 PM, Dan Colish <dcolish@gmail.com> wrote:
> >>
> >> On Jul 16, 2010, at 9:23 AM, Kevin Cullinane wrote:
> >>
> >> > I am a scripter mostly, looking to branch out. I did the tutorial, and I
> >> > have been modifying it to make a little inventory system (using an sqlite
> >> > tutorial in concert with the flask tutorial). I have made some changes, and
> >> > everything seems kosher, except the show entries is showing the 
title and id
> >> > and the other fields I added just show [3] [4] [5]. This is a 
dropbox url to
> >> > a zip file with the code.
> >> >
> >> > http://dl.dropbox.com/u/5863544/inv_flask.zip
> >> >
> >> > Thanks in advance for the help
> >> >
> >> > Kevin
> >>
> >> Could you put you code somewhere we can get at it in a non-binary form?
> >>
> >> --Dan
> >
> >
> 

Re: [flask] Question

From:
Kevin Cullinane
Date:
2010-07-16 @ 17:04
Thanks Dan

On Fri, Jul 16, 2010 at 12:57 PM, Dan Colish <dcolish@gmail.com> wrote:

> Hey Kevin,
>
> in this line:
>
>    entries = [dict(IdNum=row[0], ItemDesc=row[1], InStock=[2], PackQty=[3],
> ItemCost=[4]) for row in cur.fetchall()]
>
> you should put `row` before all the array indexes, like so:
>
>    entries = [dict(IdNum=row[0], ItemDesc=row[1], InStock=row[2],
> PackQty=row[3], ItemCost=row[4]) for row in cur.fetchall()]
>
> Otherwise, you're not getting at the array variable row, you're creating a
> new array.
>
> --Dan
>
>
> On Jul 16, 2010, at 9:48 AM, Kevin Cullinane wrote:
>
> > http://paste.pocoo.org/show/238359/
> >
> > On Fri, Jul 16, 2010 at 12:44 PM, Dan Jacob <danjac354@gmail.com> wrote:
> > If it's a small bit of code, put the relevant part of the code in a
> pastebin:
> >
> > http://paste.pocoo.org/
> >
> > If it's a lot of code, use a github or bitbucket repository.
> >
> > On 16 July 2010 17:35, Kevin Cullinane <kevin.cullinane@gmail.com>
> wrote:
> > > sorry, didn't think, just changed file in the zip to .txt
> > >
> > > On Fri, Jul 16, 2010 at 12:25 PM, Dan Colish <dcolish@gmail.com>
> wrote:
> > >>
> > >> On Jul 16, 2010, at 9:23 AM, Kevin Cullinane wrote:
> > >>
> > >> > I am a scripter mostly, looking to branch out. I did the tutorial,
> and I
> > >> > have been modifying it to make a little inventory system (using an
> sqlite
> > >> > tutorial in concert with the flask tutorial). I have made some
> changes, and
> > >> > everything seems kosher, except the show entries is showing the
> title and id
> > >> > and the other fields I added just show [3] [4] [5]. This is a
> dropbox url to
> > >> > a zip file with the code.
> > >> >
> > >> > http://dl.dropbox.com/u/5863544/inv_flask.zip
> > >> >
> > >> > Thanks in advance for the help
> > >> >
> > >> > Kevin
> > >>
> > >> Could you put you code somewhere we can get at it in a non-binary
> form?
> > >>
> > >> --Dan
> > >
> > >
> >
>
>

Re: [flask] Question

From:
Dan Colish
Date:
2010-07-16 @ 16:37
Oh, I was just suggesting that you put the code where downloading and 
unzipping is not required.

On Jul 16, 2010, at 9:35 AM, Kevin Cullinane wrote:

> sorry, didn't think, just changed file in the zip to .txt 
> 
> On Fri, Jul 16, 2010 at 12:25 PM, Dan Colish <dcolish@gmail.com> wrote:
> 
> On Jul 16, 2010, at 9:23 AM, Kevin Cullinane wrote:
> 
> > I am a scripter mostly, looking to branch out. I did the tutorial, and
I have been modifying it to make a little inventory system (using an 
sqlite tutorial in concert with the flask tutorial). I have made some 
changes, and everything seems kosher, except the show entries is showing 
the title and id and the other fields I added just show [3] [4] [5]. This 
is a dropbox url to a zip file with the code.
> >
> > http://dl.dropbox.com/u/5863544/inv_flask.zip
> >
> > Thanks in advance for the help
> >
> > Kevin
> 
> Could you put you code somewhere we can get at it in a non-binary form?
> 
> --Dan
> 

Re: [flask] Question

From:
Kevin Cullinane
Date:
2010-07-16 @ 16:44
Any suggestions?

On Fri, Jul 16, 2010 at 12:37 PM, Dan Colish <dcolish@gmail.com> wrote:

> Oh, I was just suggesting that you put the code where downloading and
> unzipping is not required.
>
> On Jul 16, 2010, at 9:35 AM, Kevin Cullinane wrote:
>
> > sorry, didn't think, just changed file in the zip to .txt
> >
> > On Fri, Jul 16, 2010 at 12:25 PM, Dan Colish <dcolish@gmail.com> wrote:
> >
> > On Jul 16, 2010, at 9:23 AM, Kevin Cullinane wrote:
> >
> > > I am a scripter mostly, looking to branch out. I did the tutorial, and
> I have been modifying it to make a little inventory system (using an sqlite
> tutorial in concert with the flask tutorial). I have made some changes, and
> everything seems kosher, except the show entries is showing the title and id
> and the other fields I added just show [3] [4] [5]. This is a dropbox url to
> a zip file with the code.
> > >
> > > http://dl.dropbox.com/u/5863544/inv_flask.zip
> > >
> > > Thanks in advance for the help
> > >
> > > Kevin
> >
> > Could you put you code somewhere we can get at it in a non-binary form?
> >
> > --Dan
> >
>
>