It's hard to say without having the full source. If the data are
different on dev and production, it's possible there's a different
execution path, causing a problem on one but not the other. But you can
tell it's not an import problem, as that would raise an import error.
And it's not a problem with the URL itself, as execution doesn't make it
that far (and you'd get a NoReverseMatch exception).

Here's a diagnostic step to try. In get_absolute_url, re-import reverse,
then log (you'll need to set up logging if you haven't already) both
reverse and str (make sure str isn't the one that's None) and then do
the actual call:

def get_absolute_url(self):
    from django.core.urlresolvers import reverse
    logger.debug(reverse)
    logger.debug(str)
    return reverse('contacts.views.group', args=[str(self.id)])

What happens with that will give you some clues about where to look
next. If it succeeds, then the "reverse" name is being reassigned at the
global scope somewhere. If it fails and "str" is None, then it's being
reassigned. If reverse is still None, then something's up with your
Django install.

_Nik

On 6/14/2013 2:37 PM, sparky wrote:
> Hi Nikolas,
>
>
>  - Guessing from the stack trace you provided, either "reverse" or
> "str" are None (since those are the only two function calls on that line).
>
> yes that will be the issue, but why is it none in production and works
> (has a value) in django server?
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to