I tried that and still got no error or directory.

        if SHA1_RE.search(activation_key):
            try:
                profile = self.get(activation_key=activation_key)
            except self.model.DoesNotExist:
                return False
            if not profile.activation_key_expired():
                user = profile.user
                user.is_active = True
                user.save()
                profile.activation_key = self.model.ACTIVATED
                profile.save()
                try:
                    import os
                    os.mkdir(MEDIA_ROOT + '/listings/' + user)
                except IOError:
                        print "could not create folder."
                return user
        return False

On Jul 8, 11:34 pm, Kenneth Gonsalves <law...@thenilgiris.com> wrote:
> On Thursday 09 Jul 2009 11:08:15 am neri...@gmail.com wrote:
>
> > profile.save()
> >                 try:
> >                     mkdir(MEDIA_ROOT + '/listings/' + user)
> >                 except IOError:
> >                         print "could notcreatefolder."
>
> should that not be
> import os
> os.mkdir(MEDIA_ROOT etc)
>
> --
> regards
> kghttp://lawgon.livejournal.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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