Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
#!/usr/local/bin/python import sys import os sys.path.append('/Users/kwe/Sites/django/django_projects') os.environ["DJANGO_SETTINGS_MODULE"] = 'beans4.settings' from beans4.gallery.models import * from solr import * c = SolrConnection(host='localhost:8983', persistent=True) items = Photo.objects.all() for i in items: c.add(id=i.id,filename_t=i.filename,caption_t= i.caption, event_t=i.event.picsUrl) c.commit() c.optimise()
From the Design Piracy series on my blog: