now it work

it need to import this:

import random,base64,sha

:)

On 14 Set, 13:10, ceriox <cer...@gmail.com> wrote:
> i have an error
> NameError: global name 'base64' is not defined
>
> On 14 Set, 10:10, Kenneth Lundström <kenneth.t.lundst...@gmail.com>
> wrote:
>
> >   I m just updating my CSV import which generates password so I found
> > this line of code:
>
> >                      password =
> > base64.b64encode(sha.sha(str(random.random())).hexdigest())[:8]
>
> > Kenneth
>
> > > hi all,
> > > how i can generate a random string of 8 numbers/letters?
> > > i need for generate an automatic password when a user complete
> > > registration in my apps
>
> > > example:
> > > Aje37Uj0
>
>

Reply via email to