Thats absolutely it. Validated and no errors found. Great stuff. I was sure I'd searched for Teacher and couldn't find anything.
Thanks again for your help. On Aug 16, 8:32 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > If I remember this correctly, Talk is the item being sold in the > store, and it has a foreignkey relationship with Teacher... so that's > where you're getting your error. > > You don't need Talks (unless that's what you're selling). > Where it says from eshop.talks.models import Talk, you need to change > that to import the thing you're going to sell. > > On Aug 16, 1:12 pm, MikeHowarth <[EMAIL PROTECTED]> wrote: > > > Importing other bits of code is still fairly new to me, I only started > > looking at django last week. > > > I basically took the files out of subversion and created a dir > > structure like so: > > > /eshop/shop > > /eshop/cart <- django cart installed here > > /eshop/talks <- additional django cart files > > > Within my settings.py my installed apps looks like this: > > > INSTALLED_APPS = ( > > 'django.contrib.auth', > > 'django.contrib.contenttypes', > > 'django.contrib.sessions', > > 'django.contrib.sites', > > 'django.contrib.admin', > > 'django.contrib.flatpages', > > 'django.contrib.sitemaps', > > 'eshop.shop', > > 'eshop.cart', > > 'eshop.talks', > > ) > > > I've snipped the contents to keep it a readable length. All imports > > happen at the top of the page so hopefully this should give you an > > idea of whats going on. > > > Models follow: > > > eshop/shop/models.py > > > from django.db import models > > from django.contrib.sitemaps import Sitemap > > > import datetime > > > #more model logic snipped contents > > > eshop/cart/models.py > > > from eshop.talks.models import Talk > > > PRICE=12 # All units have a price of $12 for now. > > > class Item: > > > #snipped contents > > > eshop/talks/models.py > > > from django.contrib.sites.models import Site > > from django.db import models > > from django.conf import settings > > > class Talk(models.Model): > > > #snipped contents > > > On Aug 16, 5:02 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > I've got it set up, but it's not plug and play... it's tied fairly > > > closely to a model you don't have. > > > It's trying to import Teacher from that model. You need to import your > > > stuff from your models. > > > > On Aug 16, 3:02 am, "Jon Atkinson" <[EMAIL PROTECTED]> wrote: > > > > > On 8/15/07, MikeHowarth <[EMAIL PROTECTED]> wrote: > > > > > > Does anyone have experience of integrating django-cart in to an app? > > > > > > I've tried adding this to my project, however soon as I use runserver > > > > > I get issues with the models: > > > > > > name 'Teacher' is not defined > > > > > > Anyone any idea? > > > > > Could you paste the output of ./manage.py validate, and your models.py > > > > file for each of your apps? It sounds like you're just missing an > > > > import statement somewhere. > > > > > --Jon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---