for some reason the function is returning false. This worked fine on Dreamhost but when I run this using the django server with the dummy send mail it returns false. The activation code is in the database so I don't understand why it would return false, here is the output of the trace:
-> if SHA1_RE.search(activation_key): (Pdb) n > /Users/jasonnerida/django-projects/dzopastudio/registration/models.py(71)activate_user() -> return False (Pdb) n --Return-- > /Users/jasonnerida/django-projects/dzopastudio/registration/models.py(71)activate_user()->False -> return False (Pdb) n > /Users/jasonnerida/django-projects/dzopastudio/registration/views.py(65)activate() -> if extra_context is None: (Pdb) n > /Users/jasonnerida/django-projects/dzopastudio/registration/views.py(66)activate() -> extra_context = {} (Pdb) n > /Users/jasonnerida/django-projects/dzopastudio/registration/views.py(67)activate() -> context = RequestContext(request) (Pdb) n > /Users/jasonnerida/django-projects/dzopastudio/registration/views.py(68)activate() -> for key, value in extra_context.items(): (Pdb) n > /Users/jasonnerida/django-projects/dzopastudio/registration/views.py(70)activate() -> return render_to_response(template_name, (Pdb) n > /Users/jasonnerida/django-projects/dzopastudio/registration/views.py(71)activate() -> { 'account': account, (Pdb) print account False On Jul 13, 5:46 am, Alex Robbins <alexander.j.robb...@gmail.com> wrote: > You might try pdb[1]. Drop > "import pdb;pdb.set_trace()" > into your code the line before "if SHA1_RE". Once at the pdb prompt > you can just type n to move forward one line at a time. Any python > code you type will get evaluated so you can check the status of > variables at each step. (Pdb is a little cryptic at first, but well > worth the time to learn it.) > Hope that helps, > Alex > > 1http://docs.python.org/library/pdb.html > > On Jul 12, 11:34 pm, neridaj <neri...@gmail.com> wrote: > > > moved os import to the top and got rid of try except, with no change. > > > 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(): > > media_root = dzopastudio.settings.MEDIA_ROOT > > user_directory_path = os.path.join(media_root, > > 'listings', 'neridaj') > > os.mkdir(user_directory_path) > > user= profile.user > > user.is_active = True > > user.save() > > profile.activation_key = self.model.ACTIVATED > > profile.save() > > returnuser > > return False > > > On Jul 12, 8:34 pm, Kenneth Gonsalves <law...@thenilgiris.com> wrote: > > > > On Monday 13 Jul 2009 8:34:23 am neridaj wrote: > > > > > I still don't get any errors or directories generated from this code, > > > > any ideas? > > > > remove the try and except stuff - then you can see where it is failing. > > > Also > > > import os on top of your file, not within the code. > > > -- > > > 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 -~----------~----~----~----~------~----~------~--~---