I was able to fix this by modifying the settings.py file INSTALLED_APPS 
section by removing django_bookmarks from 'django_bookmarks.bookmarks'.

Tonu

Tonu wrote:
> I am trying to write a small program that imports delicious bookmarks
> into the Django project's database.  When I try the commands using
> manage.py shell , then they work, but when I put the commands into a
> file "feed.py" and try them I receive an error: " ImportError: No
> module named django_bookmarks.bookmarks".  The error occurs on line
> #11 (user = User.objects.get(id=1)).
>
> I tried to make sure in my file that I include the necessary path
> information to the settings file.  I wonder if anyone has insight into
> what I am doing wrong.  Here is the file that I am using.  It resides
> in the django_bookmarks folder.
>
> Thank you,
> Tonu
>
> #!/usr/local/bin/python
> import feedparser
> import os.path
> os.environ['DJANGO_SETTINGS_MODULE']='settings'
> from django.contrib.auth.models import User
> from bookmarks.models import *
> d = feedparser.parse('http://feeds.delicious.com/v2/rss/utools')
>
> link9 = Link(url=d.entries[2].link)
> link9.save()
> user = User.objects.get(id=1)
> link = Link.objects.get(id=9)
> bookmark = Bookmark (
>       title = d.entries[2].title,
>       desc = d.entries[2].description,
>       link = link,
> )
> bookmark.save()
>   


-- 
Tonu Mikk
Educational Technology Consultant
Digital Media Center - dmc.umn.edu
tm...@umn.edu 612 625-9221


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to