Raphael,
Seems like the problem might be in my models. My view code that tries to
access the model is:
@csrf_exempt
def target_spot(request, game_id, spot):
game = fetch_game(request.user, game_id)
game.creator_target_board[int(spot)] = "X"
return HttpResponse('/')
game.creator_target_board[int(spot)] = "X" tries to change a unicode
object. creator_target_board is an attribute of my game object. In my
model, creator_target_board = models.CharField(max_length=100, default=" "
* 100). I was trying to replicate an array but since I couldn't figure out
what type of field to use for an array I decided to use a CharField with a
default value of " " * 100. The "spot" variable in my javascript is
supposed to point to the position of creator_target_board to be modified.
On Saturday, January 19, 2013 10:16:54 AM UTC-5, Raphael wrote:
>
> Hello Dex,
>
> forget my story about Chrome/Chromium issue if you have been testing with
> FF.
> This was a first shot into the dark. sorry.
>
> Concerning your error message:
> 'unicode' object does not support item assignment
>
> This error pops up when you try to alter immutable string objects.
>
> Please check your code if you do so and tell us.
> +add traceback and view code.
>
> Thank you
> --
>
> Raphaelhttp://develissimo.com
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/sBlVfmp9e6wJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.