On Friday, 22 June 2012 15:49:31 UTC+1, aid wrote:
>
>
> Hi Emily, 
>
> On 22 Jun 2012, at 15:46, Emily wrote: 
>
> > This is the class I created... 
> > 
> > import string 
> > import random 
> > 
> > class Helpers: 
> > 
> >     def random_password(): 
>
> Take random_password outside of the Helpers class and you should be OK. 
>  On the import statement you need to refer to a 'top level object' within 
> the imported file.  The only top level object you have is the class 
>  Helpers - which it doens't look like you really need. 
>
> Cheers, 
>
> aid 
>
>
+1. Python is not Java. Don't use a class unless you're encapsulating data.
--
DR. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/eV6jxgDm7cgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to