thanks karen, i think my views.py file is the source of the error, as it tries to import from winebago.models like so:
from winebago.models import Models (Models is defined after AuthPermission in models.py, and there are 3 other tables defined before AuthPermission in models.py - none of which raise an error). As far as I can tell, AuthPermission was created by the authentication module; i've commented out everything else in my views.py file after the 'from winebago.models import Models', so it's not like I'm trying to call AuthPermission without it being defined. these are the only lines in views.py: from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from winebago.models import Models here is my urls.py file (i commented everything out to figure out where the error was from): from django.conf.urls.defaults import * from winebago.views import homepage urlpatterns = patterns('', ) am i doing something wrong? On Apr 28, 9:11 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > 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 django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---