I have no errors with Django 1.5.4 (stable), but when I tested my application on Django 1.6 beta 4 from the official tar.gz, I got an error with validation models at startup.
models.py
from django.contrib.auth.models import AbstractUser, User class ShopUser(AbstractUser): model_car = models.CharField(max_length=200) date_car = models.DateField() description = models.TextField(blank=True, db_index=True) manager = models.ForeignKey(User)
This is the console.py runningerver management log :
Validating models... Unhandled exception in thread started by <function wrapper at 0x2d941b8> Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 93, in wrapper fn(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 97, in inner_run self.validate(display_num_errors=True) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 312, in validate raise CommandError("One or more models did not validate:\n%s" % error_text) django.core.management.base.CommandError: One or more models did not validate: adminka.shopuser: Accessor for m2m field 'groups' clashes with related m2m field 'Group.user_set'. Add a related_name argument to the definition for 'groups'. adminka.shopuser: Accessor for m2m field 'user_permissions' clashes with related m2m field 'Permission.user_set'. Add a related_name argument to the definition for 'user_permissions'. auth.user: Accessor for m2m field 'groups' clashes with related m2m field 'Group.user_set'. Add a related_name argument to the definition for 'groups'. auth.user: Accessor for m2m field 'user_permissions' clashes with related m2m field 'Permission.user_set'. Add a related_name argument to the definition for 'user_permissions'.
- python -c "import django; print django.get_version ()"
1.6b4
What needs to be done to solve this problem?
source share