Instead of showing you how to get rid of this error, I will try to explain what is wrong with your design.
First, the Moves
class, as you defined it, does not make sense as a model. This is because there are no model fields defined there. If you want to store data with this model, you have to define attributes which are instances of field classes.
So you would probably want to rename Moves
to Move
(as it represents a single move) and redefine it as follows:
from django.db import models
from django.utils.translation import ugettext as _
class Move(models.Model):
PLAYER_1, PLAYER_2 = 1, 2
PLAYERS = (
(PLAYER_1, _('Player 1')),
(PLAYER_2, _('Player 2'))
)
game = models.ForeignKey(Game, related_name='moves')
player = models.IntegerField(choices=PLAYERS)
x = models.IntegerField()
y = models.IntegerField()
Now, if you want to create a game and a move and add it to the game then you could write something like this:
game = Game.objects.create(...)
move = Move.objects.create(game=game, x=1, y=5, player=Move.PLAYER_2)