AttributeError: 'TaggableManager' object has no attribute 'primary_key'

74 views
Skip to first unread message

vinoth kumar renganathan

unread,
Jan 21, 2014, 3:21:08 AM1/21/14
to django...@googlegroups.com
When i making new migration with this command "python manage.py schemamigration blogger --auto" it shows " You cannot use --auto on an app with no migrations. Try --initial."

so i try to run "python manage.py schemamigration blogger --initial" . And i got this in my terminal
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/South-0.8.1-py2.7.egg/south/management/commands/schemamigration.py", line 151, in handle
    for action_name, params in change_source.get_changes():
  File "/usr/local/lib/python2.7/dist-packages/South-0.8.1-py2.7.egg/south/creator/changes.py", line 460, in get_changes
    model_defs = freeze_apps([self.migrations.app_label()])
  File "/usr/local/lib/python2.7/dist-packages/South-0.8.1-py2.7.egg/south/creator/freezer.py", line 32, in freeze_apps
    frozen_models.update(model_dependencies(model))
  File "/usr/local/lib/python2.7/dist-packages/South-0.8.1-py2.7.egg/south/creator/freezer.py", line 96, in model_dependencies
    depends.update(field_dependencies(field, checked_models))
  File "/usr/local/lib/python2.7/dist-packages/South-0.8.1-py2.7.egg/south/creator/freezer.py", line 132, in field_dependencies
    value = get_attribute(field, attrname)
  File "/usr/local/lib/python2.7/dist-packages/South-0.8.1-py2.7.egg/south/utils/__init__.py", line 38, in get_attribute
    value = getattr(value, part)
AttributeError: 'TaggableManager' object has no attribute 'primary_key'


Herewith attached detail about my project.

urls.py                               http://pastebin.com/Cibt5a9L
models.py                          http://pastebin.com/prYeigN9
views.py                            http://pastebin.com/AJu2PXkJ
tagpage.html                      http://pastebin.com/MBaj23cx

Also installed 'taggit'  in settings.py


 

Jonathan Pentecost

unread,
Jan 21, 2014, 3:35:55 PM1/21/14
to django...@googlegroups.com
I think there is a problem with the taggit library, possibly similar to https://github.com/alex/django-taggit/issues/186?
Reply all
Reply to author
Forward
0 new messages