Django model queryset error for meta class

I am getting this weird error and I am not able to figure out the reason. I've checked and product models both show no exceptions for code. My and is as follows:

class Variation(models.Model):     product = models.ForeignKey(Product)     title = models.CharField(max_length=120)     price = models.DecimalField(decimal_places=2, max_digits=20)     sale_price = models.DecimalField(decimal_places=2, max_digits=20, null=True, blank=True)     active = models.BooleanField(default=True)     inventory = models.IntegerField(null=True, blank=True) #refer none == unlimited amount      def __unicode__(self):         return self.title

from django import forms from django.forms.models import modelformset_factory from .models import Variation   class VariationInventoryForm(forms.ModelForm):     class Meta:         model = Variation         fields = [             "price",             "sale_price",             "inventory",             "active",         ]   VariationInventoryFormSet = modelformset_factory(Variation, form=VariationInventoryForm, extra=0) 


AttributeError at /products/ 'ProductQuerySet' object has no attribute '_meta' Request Method: GET Request URL:    http://localhost:8000/products/ Django Version: 1.8.13 Exception Type: AttributeError Exception Value:     'ProductQuerySet' object has no attribute '_meta' Exception Location: C:\Users\Alikhan\commmerce\lib\site-packages\django\contrib\contenttypes\ in _get_opts, line 32 Python Executable:  C:\Users\Alikhan\ecommerce\Scripts\python.EXE Python Version: 2.7.9  Please advise. 


Category: python Time: 2016-07-28 Views: 0
Tags: python django

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.136 (s). 12 q(s)