On Mon, Apr 28, 2008 at 11:54 PM, skunkwerk <[EMAIL PROTECTED]> wrote:
> > I've been struggling with this error for the past hour. > > Error while importing URLconf 'winebago.urls': name 'AuthPermission' > is not defined > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > urlresolvers.py in _get_urlconf_module, line 255 > > my models.py was generated by: ./manage.py inspectdb > models.py > > the relevant lines from models.py: > class AuthPermission(models.Model): > id = models.IntegerField(primary_key=True) > name = models.CharField(max_length=150) > content_type = models.ForeignKey(DjangoContentType) > codename = models.CharField(unique=True, max_length=300) > class Meta: > db_table = u'auth_permission' > > i can't figure out why this is happening, as i didn't change anything > to do with the models. > The problem is in your winebago urls.py file. You are apparently referring to AuthPermission without having first imported it (via something like from winebago.models import AuthPermission). Without an import Python doesn't know where to find the definition for something that has not already been defined in the file it is processing. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

