1👍
Avoid using CamelCase in Model Fields. Django Codigo Style – Model Field
“Field names should be all lowercase, using underscores instead of camelCase.”
Avoid using CamelCase in functions and methods.
“Use underscores, not camelCase, for variable, function and method names (i.e. poll.get_unique_voters(), not poll.getUniqueVoters).”
Try choosing another name for storetags method. Maybe it clashes with storetags field name.django hash object
0👍
Try with code:
models
class Tags(models.Model):
#...
def __unicode__(self):
return '%s' % self.tag
class Stores(models.Model):
#...
def __unicode__(self):
return '%s' % self.storeTags.tag
admin, list_display is not supported to ManyToMany, i'm remove storetags
class storesAdmin(admin.ModelAdmin):
list_display = ('storename','storedescription','storeurl',
'storepopularitynumber','storeimage',
'storeslug','createdat','createdat'
)
Tell me if it works correctly.
Source:stackexchange.com