Here's the truncated version I tried to load in case the problem was the length of the file: - fields: {location: ST. DENNIS HOTEL, restaurant: Veterans American Guard, status: complete, year: 1900} model: dishes.menu pk: 12495 - fields: {location: BOSTON, restaurant: New England Shorthand Reporter's Association, status: complete, year: 1900} model: dishes.menu pk: 12563 - fields: {location: RMS LUCANIA, restaurant: Cunard Line, status: under review, year: 1900} model: dishes.menu pk: 12749 - fields: {location: IROQUOIS, restaurant: Alumni Association University Of Buffalo, status: complete, year: 1900} model: dishes.menu pk: 12826 - fields: {location: '[CHICAGO', restaurant: Chicago Bar Association, status: complete, year: 1900} model: dishes.menu pk: 12836 - fields: {location: NEW YORK, restaurant: Hotel Marlborough, status: under review, year: 1900} model: dishes.menu pk: 12841 - fields: {location: NEW YORK, restaurant: Hotel Marlborough, status: complete, year: 1900} model: dishes.menu pk: 12960 - fields: {location: HOTEL MARLBOROUGH, restaurant: District No.3 Catholic Benevolent Legion, status: under review, year: 1900} model: dishes.menu pk: 13076 - fields: {location: 9 & 10 BATTERY PL. NY, restaurant: Castle Garden Hotel, status: complete, year: 1900} model: dishes.menu pk: 13117
Here's the model: class Menu(models.Model): restaurant=models.TextField(unique=False) year=models.IntegerField(unique=False,null=True) location=models.TextField(unique=False) status=models.CharField(unique=False,max_length=20) pk=models.IntegerField(primary_key=True) def __unicode__(self): return restaurant def __period__(self):#adapted from http://stackoverflow.com/questions/2272149/round-to-5or-other-number-in-python try: p=int(10*round(float(self.year)/10)) if p < self.year: return "%s-%s"%(p,p+5) else: return "%s-%s"%(p-5,p) except: return "" period=property(__period__) language = models.CharField(unique=False,max_length=30) I'd really appreciate any help on this. On Saturday, December 29, 2012 3:28:34 PM UTC-5, Ryan Blunden wrote: > > Can you provide a single example of one of the fixture objects you're > trying to import, as well as the model it corresponds to? > > On 29/12/2012, at 11:34 AM, Sam Raker <sam....@gmail.com <javascript:>> > wrote: > > Hello, > I've got a very tight deadline, and I'm encountering a very frustrating > problem. Every time I try to use loaddata to load my data into my database, > I get the loaddata error in the subject. I've tried YAML, I've tried JSON, > I've tried excerpting only a few lines of each, all to no avail. I'm really > at my rope's end. I don't think my models are flawed in any significant > way--each refers to only one field in one other model (the primary key in > four out of five of them). > > I need to get this working by the 2nd, and I've looked all over the > internet and posted a question at Stackoverflow and still can't figure it > out. I really need some help. > > Thanks, > -sam > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/WLBxL9nsC1IJ. > To post to this group, send email to django...@googlegroups.com<javascript:> > . > To unsubscribe from this group, send email to > django-users...@googlegroups.com <javascript:>. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/fI4rtItIhGIJ. 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.