Thats what i don't understand.....i am trying to learn django using"Learning Website development with django" when i get to the step of using models it gives me the second script below and says to insert the top script and after i type ' python manage.py syncdb i get an *NameError : name 'models' is not defined
I am supposed to get: *CREATE TABLE "bookmarks_bookmark" ( "id" integer NOT NULL PRIMARY KEY, "title" varchar(200) NOT NULL, "user_id" integer NOT NULL REFERENCES "auth_user" ("id"), "link_id" integer NOT NULL REFERENCES "bookmarks_link" ("id"), ); CREATE TABLE "bookmarks_link" ( "id" integer NOT NULL PRIMARY KEY, "url" varchar(200) NOT NULL UNIQUE ); COMMIT;* After i type: python mange.py sql bookmarks * On Wed, Oct 28, 2009 at 4:31 AM, David <baer.da...@gmail.com> wrote: > > can you explain a bit better? where do you want to insert? > > On 28 Okt., 00:46, Vman <jones...@gmail.com> wrote: > > how do i insert this: > > > > from django.contrib.auth.models import User > > class Bookmark(models.Model): > > title = models.CharField(maxlength=200) > > user = models.ForeignKey(User) > > link = models.ForeignKey(Link) > > > > into this? > > > > from django.db import models > > class Link(models.Model): > > url = models.URLField(unique=True) > > > > I am getting this error: > > > > NameError: name 'models' is not defined > > > > Thanks... > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---